Quantify uncertainty and sensitivities in your computer models with an industry-grade Monte Carlo library.
Project description
Quantify uncertainty and sensitivities in your computer models with an industry-grade Monte Carlo library.
Overview
At the heart of all serious forecasting, whether that be of elections, the spread of pandemics, weather, or the path of a rocket on its way to Mars, is a statistical tool known as the Monte Carlo method. The Monte Carlo method, named for the rolling of the dice at the famous Monte Carlo casino located in Monaco, allows you to quantify uncertainty by introducing randomness to otherwise deterministic processes, and seeing what the range of results is.
monaco
is a python library for analyzing uncertainties and sensitivities in your computational models by setting up, running, and analyzing a Monte Carlo simulation wrapped around that model. Users can define random input variables drawn using chosen sampling methods from any of SciPy's continuous or discrete distributions (including custom distributions), preprocess and structure that data as needed to feed to their main simulation, run that simulation in parallel anywhere from 1 to millions of times, and postprocess the simulation outputs to obtain meaningful, statistically significant conclusions. Plotting and statistical functions specific to use cases that might be encountered are provided, and repeatability of results is ensured through careful management of random seeds.
Quick Start
First, install monaco
:
pip install monaco
Then, copy the two files from the template directory, which contains a simple, well commented Monte Carlo simulation of flipping coins. That link also contains some exercises for you to do, to help you familiarize yourself with how monaco
is structured.
After working through the template exercises, check out the other examples for inspiration and more in-depth usage of monaco
's features.
Documentation / API Reference / SciPy 2022 Talk
Documentation is being built up - read the docs here: https://monaco.readthedocs.io
Currently there is a complete API reference, more detailed installation, test, and publishing instructions, an overview of the basic architecture and basic workflow, and some details on statistical distributions and sampling methods.
Monaco was presented at the SciPy 2022 Conference, and the conference resources should give another good overview of the library. Check out the paper, the video of the talk, and the talk's slides and notebooks.
License / Citation
Copyright 2020 Scott Shambaugh, distributed under the MIT license.
If you use monaco
to do research that gets published, please cite the conference paper using the below or monaco.bib:
W. Scott Shambaugh (2022). Monaco: A Monte Carlo Library for Performing Uncertainty and Sensitivity Analyses. In Proceedings of the 21st Python in Science Conference (pp. 202 - 208).
Further Reading
- Hanson, J. M., and B. B. Beard. "Applying Monte Carlo simulation to launch vehicle design and requirements analysis." National Aeronautics and Space Administration, Marshall Space Flight Center, 1 September 2010.
- Razavi, S. et. al. "The future of sensitivity analysis: an essential discipline for systems modeling and policy support." Environmental Modelling & Software Volume 137, March 2021.
- Satelli, A. et. al. "Why so many published sensitivity analyses are false: A systematic review of sensitivity analysis practices." Environmental Modelling & Software Volume 114, April 2019.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file monaco-0.10.0.tar.gz
.
File metadata
- Download URL: monaco-0.10.0.tar.gz
- Upload date:
- Size: 54.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.0 Linux/5.10.102.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8769ea3216cdfc72f4cf93fd0e63349396f7128e8f41786ec886d87bf921c896 |
|
MD5 | 27d1f48272fd3398c200877c88a28a7c |
|
BLAKE2b-256 | 9bd8e214ea1c8461cceadf4689ddce48c73c8f531bc6c46c1b3b2059bdf39a4e |
File details
Details for the file monaco-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: monaco-0.10.0-py3-none-any.whl
- Upload date:
- Size: 58.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.0 Linux/5.10.102.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ee0b1c622e8455a8a1e81d129b1402c02f512fb4a7c3c482a6e2aee94f8b733 |
|
MD5 | 4f8631b598b4c23805912866eac872f7 |
|
BLAKE2b-256 | 3434707189a23a332afe4b652e4c4409f84347a3ae587b0b3651fefba25b4531 |