example: add surrogate modeling demonstration with scikit-learn#308
example: add surrogate modeling demonstration with scikit-learn#308Nithurshen wants to merge 5 commits intomesa:mainfrom
Conversation
EwoutH
left a comment
There was a problem hiding this comment.
Cool applications. Clearly shows something new.
@quaquel do you have an opinion on surrogate modelling for ABMs? Has its place in high SNR-models with stable and continuous outcome landscapes, but tricky and used with caution?
Maybe best used as an evaluation tool. With the quality of the surrogate model fit as the main outcome.
There was a problem hiding this comment.
This might be nice as a Jupyter notebook, with maybe a few visualisations (but don't overdo it)
| This example requires the `latest` version of Mesa and additional machine learning dependencies: | ||
|
|
||
| ```bash | ||
| pip install mesa scikit-learn scipy pandas |
There was a problem hiding this comment.
scipy and pandas are already dependencies of mesa
There was a problem hiding this comment.
I don't think we need the pyproject.toml the readme already list the dependencies.
|
This is really cool @Nithurshen thanks! Could you add a brief description to the repo readme in other examples |
Summary
This PR adds a new example,
surrogate_modeling, which demonstrates how to integrate Mesa with Scikit-learn to create an emulator (surrogate model). This allows users to approximate the behavior of a complex Agent-Based Model (ABM) across a high-dimensional parameter space using only a small number of actual simulation runs.Motive
Computational expense is a common bottleneck in ABM research, especially during calibration or sensitivity analysis. This PR offloads these concerns to Scikit-learn and Scipy to provide users with a robust workflow for efficient experimentation.
Implementation
examples/surrogate_modeling/to demonstrate integration without modifying the core library.batch_runandDataCollectorin favor of manual Python loops to align with Mesa 4.0 roadmap.Usage Examples
Users can run the entire pipeline from sampling to prediction with a single command:
Additional Notes
surrogateinpyproject.tomlincludingscikit-learn.