New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sensitivity

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sensitivity

Python Sensitivity Analysis - Gradient DataFrames and Hex-Bin Plots

  • 0.2.8
  • PyPI
  • Socket score

Maintainers
1

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()

See the documentation here.

Author

Created by Nick DeRobertis. MIT License.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc