A low-code interpretable machine learning toolbox in Python.
Project description
A low-code interpretable machine learning toolbox in Python
PiML (or π·ML, /ˈpaɪ·ˈem·ˈel/) is a new Python toolbox for Interpretable Machine Learning model development and validation. Through low-code automation and high-code programming, PiML supports various machine learning models in the following two categories:
- Inherently interpretable models:
- EBM: Explainable Boosting Machine (Nori, et al. 2019; Lou, et al. 2013)
- GAMI-Net: Generalized Additive Model with Structured Interactions (Yang, Zhang and Sudjianto, 2021)
- ReLU-DNN: Deep ReLU Networks using Aletheia Unwrapper (Sudjianto, et al. 2020)
- Arbitrary black-box models,e.g.
- LightGBM or XGBoost of varying depth
- RandomForest of varying depth
- Residual Deep Neural Networks
Low-code Examples
Click the ipynb links to run examples in Google Colab:
Begin your own PiML journey with this demo notebook.
Low-code Usage on Google Colab
Stage 1: Initialize an experiment, Load and Prepare data
from piml import Experiment
exp = Experiment(platform="colab")
exp.data_loader()
exp.data_summary()
exp.data_prepare()
exp.eda()
Stage 2: Train intepretable models
exp.model_train()
Stage 3. Explain and Interpret
exp.model_explain()
exp.model_interpret()
Stage 4. Diagnose and Compare
exp.model_diagnose()
exp.model_compare()
Arbitrary Black-Box Modeling
For example, train a complex LightGBM with depth 7 and register it to the experiment:
from lightgbm import LGBMRegressor
pipeline = exp.make_pipeline(LGBMRegressor(max_depth=7))
pipeline.fit()
exp.register(pipeline=pipeline, name='LGBM')
Then, compare it to inherently interpretable models (e.g. EBM and GAMI-Net):
exp.model_compare()
Citations
PiML, ReLU-DNN Aletheia and GAMI-Net
"PiML: A Python Toolbox for Interpretable Machine Learning Model Development and Validation" (A. Sudjianto, A. Zhang, Z. Yang, Y. Su, N. Zeng and V. Nair, 2022)
@article{sudjianto2022piml,
title={PiML: A Python Toolbox for Interpretable Machine Learning Model Development and Validation},
author={Sudjianto, Agus and Zhang, Aijun and Yang, Zebin and Su, Yu and Zeng, Ningzhou and Nair Vijay},
journal={To appear},
year={2022}
}
"Designing Inherently Interpretable Machine Learning Models" (A. Sudjianto and A. Zhang, 2021) arXiv link
@article{sudjianto2021designing,
title={Designing Inherently Interpretable Machine Learning Models},
author={Sudjianto, Agus and Zhang, Aijun},
journal={arXiv preprint:2111.01743},
year={2021}
}
"Unwrapping The Black Box of Deep ReLU Networks: Interpretability, Diagnostics, and Simplification" (A. Sudjianto, W. Knauth, R. Singh, Z. Yang and A. Zhang, 2020) arXiv link
@article{sudjianto2020unwrapping,
title={Unwrapping the black box of deep ReLU networks: interpretability, diagnostics, and simplification},
author={Sudjianto, Agus and Knauth, William and Singh, Rahul and Yang, Zebin and Zhang, Aijun},
journal={arXiv preprint:2011.04041},
year={2020}
}
"GAMI-Net: An Explainable Neural Network based on Generalized Additive Models with Structured Interactions" (Z. Yang, A. Zhang, and A. Sudjianto, 2021) arXiv link
@article{yang2021gami,
title={GAMI-Net: An explainable neural network based on generalized additive models with structured interactions},
author={Yang, Zebin and Zhang, Aijun and Sudjianto, Agus},
journal={Pattern Recognition},
volume={120},
pages={108192},
year={2021}
}
EBM and GA2M
"InterpretML: A Unified Framework for Machine Learning Interpretability" (H. Nori, S. Jenkins, P. Koch, and R. Caruana, 2019)
@article{nori2019interpretml,
title={InterpretML: A Unified Framework for Machine Learning Interpretability},
author={Nori, Harsha and Jenkins, Samuel and Koch, Paul and Caruana, Rich},
journal={arXiv preprint:1909.09223},
year={2019}
}
"Accurate intelligible models with pairwise interactions" (Y. Lou, R. Caruana, J. Gehrke, and G. Hooker, 2013)
@inproceedings{lou2013accurate,
title={Accurate intelligible models with pairwise interactions},
author={Lou, Yin and Caruana, Rich and Gehrke, Johannes and Hooker, Giles},
booktitle={Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
pages={623--631},
year={2013},
organization={ACM}
}
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 Distributions
Built Distributions
Hashes for PiML-0.1.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebe38adce97bffcfa13621140dc21abef5b59113e6272a4c22a65aaadcfb9056 |
|
MD5 | ee71660ea0a25b57f1c05bcd348b2494 |
|
BLAKE2b-256 | 8d3e91da50aa485d857f5cd6f4deec871177dd3f37cbd55efea79f77f1353431 |
Hashes for PiML-0.1.1-cp39-none-manylinux_2_5_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a96805489f6543bb2e6db93d28ad59ba79e20c15fbae00d844aaa7fff19d35 |
|
MD5 | 03f66a5849c83504dac5fe4d36c948b7 |
|
BLAKE2b-256 | 57dc8533844086e2e290eb7e96b88da57cb6001ab292c7df13d6cbef4311a48e |
Hashes for PiML-0.1.1-cp39-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf15b6b4b9f94eb044fdc10275184c075ec2bf3366a46f2f114ab6e5d576066 |
|
MD5 | bd664a01b77657350b999416d51666ae |
|
BLAKE2b-256 | e5cfade0a4031b49643d32c71afd0f853ee271955698c0d4084c41925138d11c |
Hashes for PiML-0.1.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f245462891c9f6548512362d549de2ae7cd241ae7b68fe15e51c5da89d24b71 |
|
MD5 | d92b5adf44354fec58e27b525a29e642 |
|
BLAKE2b-256 | 28e9d61006ba0afe6f5605ed09d6a79a53629ced3f9e4d4afdd46247df79f684 |
Hashes for PiML-0.1.1-cp38-none-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e2b25498510975b2f76dbcab94d1bb6ff99a65b0ffb3f81b24fdd4dd7f8b45 |
|
MD5 | d8c0f3bfde3b5eec20f0770c27bb1d78 |
|
BLAKE2b-256 | 27a24d48293fde1aa80aa2d60906511841f208176c5e4120cc27d0c086fc1739 |
Hashes for PiML-0.1.1-cp38-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3dd8034252da402fb6488ace3ca6aa4514187d0b5fa8c7f58346b6e8ad43e3f |
|
MD5 | d4ca9e021f7b538534a7531e3bccdf12 |
|
BLAKE2b-256 | 90ce21fe4abb55311eaed25720509d3d567337f5f9306bd60a4609aefd2bb767 |
Hashes for PiML-0.1.1-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e635f9c9f0bb3a9ff75842155703e73f71affeeeb72ad6ef421f952b4b9eea38 |
|
MD5 | 54de39ff7d99f9c584da0f32c7d66d8c |
|
BLAKE2b-256 | 483e0979290a5a3ecd82129461c0b1eab2cf68b6e1bfd2156faca1c5eed8a1c4 |
Hashes for PiML-0.1.1-cp37-none-manylinux_2_5_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66e3b2c5c0b156b85629188f14741c939c37071345e7f5405fb62bbe9341ee7a |
|
MD5 | 3544306ad95d1387f55084fc97d00202 |
|
BLAKE2b-256 | be6df6febbda4a9ff1f985574680abd5a5d9b23b6220163383f21e54ee17324f |
Hashes for PiML-0.1.1-cp37-none-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4cfc690a4fa3cfa185e93642723254e2ff353de37ca9ccd4b3fc40e3476372d |
|
MD5 | 52fb7abd3453d4aaa68ca84dde77ac69 |
|
BLAKE2b-256 | 908944e766bad5726a8f30732aaec4912eac97fdf7a219b01c131c67cdfd8542 |