Python Sensitivity Analysis - Gradient DataFrames and Hex-Bin Plots
Project description
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:
from sensitivity import SensitivityAnalyzer
def my_model(x_1, x_2):
return x_1 ** x_2
sensitivity_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.
Author
Created by Nick DeRobertis. MIT License.
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
Hashes for sensitivity-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71213ee32c593dc478945890b737f2cb56a085bd5c77914907146f5c907ce948 |
|
MD5 | 292650c164cae3365f04690d4678796d |
|
BLAKE2b-256 | 02a4280eff05a070b655cacc78754ad8321c3b922ef0021578b68112f074ba74 |