Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add built-in function for local sensitivity analysis #1908

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Dec 15, 2023

  1. Configuration menu
    Copy the full SHA
    608b3e1 View commit details
    Browse the repository at this point in the history
  2. Add local_sensitivity_analysis function

    This commit introduces a new function, `local_sensitivity_analysis`, to the Mesa modeling framework, enhancing the capabilities for conducting sensitivity analysis on agent-based models. This function significantly improves the flexibility and precision of parameter variation studies.
    
    Key Features:
    - The function accepts both relative and absolute ranges for parameter variations. Users can specify a common range of multipliers (for relative changes) or specific values (for absolute changes) that are applied uniformly to all numeric parameters. This allows for a more nuanced exploration of parameter impacts.
    - An additional argument, `specific_ranges`, is introduced. This optional parameter lets users define custom ranges or multipliers for specific model parameters, providing even greater control over the sensitivity analysis process.
    - The `ignore_parameters` argument is included, allowing users to exclude certain parameters from the analysis. This is particularly useful for non-numeric parameters or those that should remain constant.
    - The function automatically handles integer parameters by rounding the varied values to the nearest integer and removing duplicates, ensuring a meaningful and efficient analysis.
    - The implementation also includes a default run using the model's baseline parameters, serving as a reference point for comparing the effects of parameter variations.
    - Additional keyword arguments (`**kwargs`) are seamlessly passed to the Mesa `batch_run` function, maintaining compatibility and flexibility with Mesa's batch running capabilities.
    EwoutH committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    ab7bea4 View commit details
    Browse the repository at this point in the history