Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nickderobertis/sensitivity
Sensitivity Analysis in Python - Gradient DataFrames and Hex-Bin Plots
https://github.com/nickderobertis/sensitivity
Last synced: 2 months ago
JSON representation
Sensitivity Analysis in Python - Gradient DataFrames and Hex-Bin Plots
- Host: GitHub
- URL: https://github.com/nickderobertis/sensitivity
- Owner: nickderobertis
- License: mit
- Created: 2020-02-10T20:33:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-11T02:07:40.000Z (almost 2 years ago)
- Last Synced: 2024-11-14T08:47:11.124Z (2 months ago)
- Language: Jupyter Notebook
- Size: 4.37 MB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[![](https://codecov.io/gh/nickderobertis/sensitivity/branch/master/graph/badge.svg)](https://codecov.io/gh/nickderobertis/sensitivity)
# sensitivity
## Overview
Python Sensitivity Analysis - Gradient DataFrames and Hex-Bin Plots
It is common in financial modeling to conduct a sensitivity analysis on the model. This analysis runs the model changing the inputs values and collecting the outputs. Then the modeler can examine how the outputs change in response to the inputs changing. This library was created to ease this process, especially around visualization of the results.
While it was developed for financial modeling, it can be used with any function to understand how changing the inputs of the function affect the outputs.
## Getting Started
Install `sensitivity`:
```
pip install sensitivity
```A simple example:
```python
from sensitivity import SensitivityAnalyzerdef my_model(x_1, x_2):
return x_1 ** x_2sensitivity_dict = {
'x_1': [10, 20, 30],
'x_2': [1, 2, 3]
}sa = SensitivityAnalyzer(sensitivity_dict, my_model)
plot = sa.plot()
styled_df = sa.styled_dfs()
```## Links
See the
[documentation here.](
https://nickderobertis.github.io/sensitivity/
)## Author
Created by Nick DeRobertis. MIT License.