mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Add built-in function for local sensitivity analysis

Open EwoutH opened this issue 6 months ago • 17 comments

Add a function that automatically configures the batchrunner to perform local sensitivity analysis. The only required input is a model.

Extensive docstring is included, see that for details.

Feedback, both conceptually and implementation wise, is very welcome!

Usage example:

# Define a relative range (e.g., 90% and 110% of the default value)
common_range = [0.9, 1.1]

# Perform the sensitivity analysis
results = local_sensitivity_analysis(
    model_cls=MyModel,
    common_range=common_range,
    ignore_parameters = ['migration_rate']
    iterations=10,  # Number of iterations for each parameter set
    max_steps=500   # Maximum number of steps per model run

EwoutH avatar Dec 15 '23 20:12 EwoutH