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.
Metadata
Release files for sensitivity 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sensitivity-0.2.8.tar.gz | 13.7 kB | Without provenance | Details for sensitivity-0.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sensitivity-0.2.8-py3-none-any.whl | Python 3 | none | any | Details for sensitivity-0.2.8-py3-none-any.whl |
Total release size: 28.6 kB
Release files / sensitivity-0.2.8.tar.gz
| Download URL | sensitivity-0.2.8.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f74bb1c99dd72e23f8259579f25d2aae254f3cca4819ed89729d7d5add2d84a3
|
|
BLAKE2b-256 checksum How to use checksums |
34b3f602131e19229f522235fee6efff253808bbb793bbdacff0bcde292b9457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Release files / sensitivity-0.2.8-py3-none-any.whl
| Download URL | sensitivity-0.2.8-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
376ae2b626a986bd9a5698e91e78e95db8977c0a13564cddd40ebcbf42e80823
|
|
BLAKE2b-256 checksum How to use checksums |
992c1f488db29169c353ffcbb52e7111fba1a01c8cc8f2b30f06c4a60892707e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Security for sensitivity 0.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.