Skip to main content

Package to calibrate and understand ML Models

Project description

ML Insights

Welcome to ML-Insights!

This package contains two main sets of tools:

  • SplineCalib: Spline-based Probability Calibration
  • ModelXRay: Model Interpretability

Probability Calibration

For probability calibration, use the SplineCalib class. Detailed documentation is available here: https://ml-insights.readthedocs.io

Find more detailed examples here: https://github.com/numeristical/introspective/tree/master/examples

Model Interpretation

For understanding black-box models, the main entry point is the ModelXRay class. Instantiate it with the model and data. The data can be what the model was trained with, but intended to be used for out of bag or test data to see how the model performs when one feature is changed, holding everything else constant.

>>> import ml_insights as mli
>>> xray = mli.ModelXRay(model, data.sample(500))
>>> xray.feature_dependence_plots()

mli_screenshot

Find more detailed examples here: https://github.com/numeristical/introspective/tree/master/examples

Other Documentation

https://ml-insights.readthedocs.io

Disclaimer

We have tested this tool to the best of our ability, but understand that it may have bugs. It was developed on Python 3. Use at your own risk, but feel free to report any bugs to our github. https://github.com/numeristical/introspective

Installation

$ pip install ml_insights

Source

Find the latest version on github: https://github.com/numeristical/introspective

Feel free to fork and contribute!

License

Free software: MIT license <LICENSE>_

Developed By

  • Brian Lucena
  • Ramesh Sampath

References

Lucena, B. 2018. Spline-Based Probability Calibration. https://arxiv.org/abs/1809.07751

Alex Goldstein, Adam Kapelner, Justin Bleich, and Emil Pitkin. 2014. Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual Conditional Expectation. Journal of Computational and Graphical Statistics (March 2014)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_insights-1.1.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

ml_insights-1.1.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file ml_insights-1.1.0.tar.gz.

File metadata

  • Download URL: ml_insights-1.1.0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ml_insights-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3d76c214c0897e7b4f75dedf87ccc27fc61a9a4e1ce75ec3b16c0d785fceda87
MD5 7107feb1a986a6118ec8a2dd24fd2de2
BLAKE2b-256 b8271d1abab871622acefc622152a453a7a472790e60d6d0379028669ddef986

See more details on using hashes here.

File details

Details for the file ml_insights-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ml_insights-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ml_insights-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e40d657f0a2464d2c17afa58150073e567612bad03d6381fe8d6678919602d1
MD5 991d4e50153ce1af974da690ddb397f7
BLAKE2b-256 c68bf9d7547d4d25d7e95b59e613c99557aec4e057d766e93aaa065cf6194a37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page