Skip to content

A Library of Jupyter widgets to visualize models and assess predictive qualities

License

Notifications You must be signed in to change notification settings

shb84/ipysensitivityprofiler

Repository files navigation

Binder PyPI version

ipysensitivityprofiler

Jupyter Widgets for visualizing local sensitivities of vectorized functions with signature y = f(x) where x,y are arrays.


Installation

pip install ipysensitivityprofiler

Example

Example notebooks are available for download on GitHub or hosted on biinder.


Documentation

Documentation is available here (generated using sphinx)


Usage

import numpy as np
import ipysensitivityprofiler as isp

def quadratic1(x):
    """y = x1**2 + x2**2 + x1*x2"""
    return (np.prod(x, axis=1) + np.power(x, 2).sum(axis=1))

def quadratic2(x):
    """y = 10 + x1**2 + x2**2 - 2 * x1*x2"""
    return (10 - 2 * np.prod(x, axis=1) + np.power(x, 2).sum(axis=1))

isp.profiler(
    models=[quadratic1, quadratic2], 
    xmin=[0, 0],
    xmax=[2, 1],
    ymin=[0],
    ymax=[20],
    x0=[1.5, 0.75],
    resolution=10_000, 
    xlabels=["x1", "x2"],
    ylabels=["y"],
)


Main Features

  • Visualize multiple outputs against multiple inputs interactively
  • Overlay more than one model at once
  • Download pictures on individual plots (by clicking on red dot)

License

Distributed under the terms of the MIT License.

About

A Library of Jupyter widgets to visualize models and assess predictive qualities

Resources

License

Stars

Watchers

Forks

Packages

No packages published