← Open Source
SelfExplainML

PiML-Toolbox

PiML (Python Interpretable Machine Learning) toolbox for model development & diagnostics.

Model DevelopmentClassical MLInterpretabilityJupyter Notebook
Open on GitHub
Momentum
+0stars in 24 hours0.0%
1.29k
Stars
135
Forks
+-1
This week
7
Contributors
Created 2022-04-29 · Updated 2026-10-13 · #10832 today
Top developers

SelfExplainML/PiML-Toolbox is ranked 10,832 with 1,286 stars.

Same-category comparison

SelfExplainML/PiML-Toolbox is ranked 10,832 among these 8 peers; Khrylx/PyTorch-RL is ranked 10,831.

Same-category comparison
NameRankMetrics
Nixtla/mlforecast10,823
Language:
Python
Stars:
1,288
Forks:
142
Description:
Scalable machine 🤖 learning for time series forecasting.
opendatalab/LabelLLM10,827
Language:
TypeScript
Stars:
1,287
Forks:
131
Description:
The Open-Source Data Annotation Platform.
weihua916/powerful-gnns10,829
Language:
Python
Stars:
1,287
Forks:
228
Description:
How Powerful are Graph Neural Networks.
Khrylx/PyTorch-RL10,831
Language:
Python
Stars:
1,286
Forks:
192
Description:
PyTorch implementation of Deep Reinforcement Learning: Policy Gradient methods (TRPO, PPO, A2C) and Generative Adversarial Imitation Learning (GAIL). Fast Fisher vector product TRPO.
kwea123/ngp_pl10,834
Language:
Jupyter Notebook
Stars:
1,286
Forks:
150
Description:
Instant-ngp in pytorch+cuda trained with pytorch-lightning (high quality with high speed, with only few lines of legible code).
oscarknagg/few-shot10,836
Language:
Python
Stars:
1,286
Forks:
243
Description:
Repository for few-shot learning machine learning projects.
pluskid/Mocha.jl10,841
Language:
Julia
Stars:
1,283
Forks:
244
Description:
Deep Learning framework for Julia.
NVIDIA/partialconv10,845
Language:
Python
Stars:
1,281
Forks:
212
Description:
A New Padding Scheme: Partial Convolution based Padding.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageJupyter Notebook
CategoryModel Development
SubcategoryClassical ML, Interpretability
Stars1,286
Forks135
Contributors7
Created date2022-04-29
Updated date2026-10-13
Stars in 1 day0
Stars in 7 days-1
Rank10,832
Previous rank10,804
Rank change-28
7-day stars rank17,210
Previous 7-day stars rank17,206
7-day stars rank change-4
Total stars rank9,167
Previous total stars rank9,152
Total stars rank change-15
README summary

Agus Sudjianto**: **Farewell PiML, Hello MoDeVa! ** After three impactful years of empowering model developers and validators, we’re thrilled to introduce the next evolution: MoDeVa – MOdel DEvelopment & VAlidation. MoDeVa builds on the success of PiML, taking transparency, interpretability, and robustness in machine learning to a whole new level. Whether you’re in a high-stakes regulatory setting or exploring cutting-edge model architectures, MoDeVa is built to support your journey. • Model Hacking Redefined: Tools to uncover failure modes, analyze robustness

, reliability and resilience. • Interactive Statistical Visualizations: Bring models to life with dynamic graphs that go beyond static charts. • Seamless Validation: Effortlessly validate external black-box models using flexible wrappers. 0 is released with enhanced data handling and model analytics. 0 is released together with PiML user guide. 0 is released with enriched models and enhanced diagnostics. 0 is released with classic statistical models. PiML (or π-ML, /ˈpaɪ·ˈem·ˈel/) is a new Python toolbox for interpretable machine learning model development

and validation. Through low-code interface and high-code APIs, PiML supports a growing list of inherently interpretable ML models: 1. **GLM**: Linear/Logistic Regression with L1 ∨ L2 Regularization 2. **GAM**: Generalized Additive Models using B-splines 3. **Tree**: Decision Tree for Classification and Regression 4. **FIGS**: Fast Interpretable Greedy-Tree Sums (Tan, et al. **XGB1**: Extreme Gradient Boosted Trees of Depth 1, with optimal binning (Chen and Guestrin, 2016; Navas-Palencia, 2020) 6. **XGB2**: Extreme Gradient Boosted Trees of

Depth 2, with effect purification (Chen and Guestrin, 2016; Lengerich, et al. **EBM**: Explainable Boosting Machine (Nori, et al. **GAMI-Net**: Generalized Additive Model with Structured Interactions (Yang, Zhang and Sudjianto, 2021) 9. **ReLU-DNN**: Deep ReLU Networks using Aletheia Unwrapper and Sparsification (Sudjianto, et al. 2020) PiML also works for arbitrary supervised ML models under regression and binary classification settings. It supports a whole spectrum of outcome testing, including but not limited to the following: 1. **Accuracy**: popular metrics

like MSE, MAE for regression tasks and ACC, AUC, Recall, Precision, F1-score for binary classification tasks. **Explainability**: post-hoc global explainers (PFI, PDP, ALE) and local explainers (LIME, SHAP). **Fairness**: disparity test and segmented analysis by integrating the solas-ai package. **WeakSpot**: identification of weak regions with high residuals by slicing techniques. **Overfit**: identification of overfitting regions according to train-test performance gap. **Reliability**: assessment of prediction uncertainty by split conformal prediction techniques. **Robustness**: evaluation of performance degradation under

covariate noise perturbation. **Resilience**: evaluation of performance degradation under different out-of-distribution scenarios. Installation | Examples | Usage | Citations Installation Low-code Examples Click the ipynb links to run examples in Google Colab: 1. Upload custom data in two ways: ipynb 7. Deal with external models: ipynb Begin your own PiML journey with this demo notebook . High-code Examples The same examples can also be run by high-code APIs: 1. Results return: ipynb Low-code Usage on Google Colab Stage

1: Initialize an experiment, Load and Prepare data Stage 2: Train intepretable models Stage 3. Diagnose and Compare Arbitrary Black

Frequently asked questions

How many stars and forks are recorded?

SelfExplainML/PiML-Toolbox has 1,286 stars and 135 forks.

What is the repository rank?

SelfExplainML/PiML-Toolbox is ranked 10,832.

What language and category are recorded?

SelfExplainML/PiML-Toolbox has 1,286 stars, uses Jupyter Notebook and belongs to Model Development.

Which repository is closest in rank?

SelfExplainML/PiML-Toolbox is compared with Khrylx/PyTorch-RL, ranked 10,831 with 1,286 stars.

README

An integrated Python toolbox for interpretable machine learning


March 30, 2025 by Dr. Agus Sudjianto: Farewell PiML, Hello MoDeVa!

After three impactful years of empowering model developers and validators, we’re thrilled to introduce the next evolution: MoDeVa – MOdel DEvelopment & VAlidation.

MoDeVa builds on the success of PiML, taking transparency, interpretability, and robustness in machine learning to a whole new level. Whether you’re in a high-stakes regulatory setting or exploring cutting-edge model architectures, MoDeVa is built to support your journey.

Why MoDeVa?

• Next-Gen Models: Interpretable ML models like Boosted Trees, Mixture of Experts, and Neural Trees—built for confident decision-making.

• Model Hacking Redefined: Tools to uncover failure modes, analyze robustness, reliability and resilience.

• Interactive Statistical Visualizations: Bring models to life with dynamic graphs that go beyond static charts.

• Seamless Validation: Effortlessly validate external black-box models using flexible wrappers.

Check it out here: https://modeva.ai/


pip install PiML

🎄 Dec 1, 2023: V0.6.0 is released with enhanced data handling and model analytics.

:rocket: May 4, 2023: V0.5.0 is released together with PiML user guide.

:rocket: October 31, 2022: V0.4.0 is released with enriched models and enhanced diagnostics.

:rocket: July 26, 2022: V0.3.0 is released with classic statistical models.

:rocket: June 26, 2022: V0.2.0 is released with high-code APIs.

:loudspeaker: May 4, 2022: V0.1.0 is launched with low-code UI/UX.

PiML (or π-ML, /ˈpaɪ·ˈem·ˈel/) is a new Python toolbox for interpretable machine learning model development and validation. Through low-code interface and high-code APIs, PiML supports a growing list of inherently interpretable ML models:

  1. GLM: Linear/Logistic Regression with L1 ∨ L2 Regularization
  2. GAM: Generalized Additive Models using B-splines
  3. Tree: Decision Tree for Classification and Regression
  4. FIGS: Fast Interpretable Greedy-Tree Sums (Tan, et al. 2022)
  5. XGB1: Extreme Gradient Boosted Trees of Depth 1, with optimal binning (Chen and Guestrin, 2016; Navas-Palencia, 2020)
  6. XGB2: Extreme Gradient Boosted Trees of Depth 2, with effect purification (Chen and Guestrin, 2016; Lengerich, et al. 2020)
  7. EBM: Explainable Boosting Machine (Nori, et al. 2019; Lou, et al. 2013)
  8. GAMI-Net: Generalized Additive Model with Structured Interactions (Yang, Zhang and Sudjianto, 2021)
  9. ReLU-DNN: Deep ReLU Networks using Aletheia Unwrapper and Sparsification (Sudjianto, et al. 2020)

PiML also works for arbitrary supervised ML models under regression and binary classification settings. It supports a whole spectrum of outcome testing, including but not limited to the following:

  1. Accuracy: popular metrics like MSE, MAE for regression tasks and ACC, AUC, Recall, Precision, F1-score for binary classification tasks.
  2. Explainability: post-hoc global explainers (PFI, PDP, ALE) and local explainers (LIME, SHAP).
  3. Fairness: disparity test and segmented analysis by integrating the solas-ai package.
  4. WeakSpot: identification of weak regions with high residuals by slicing techniques.
  5. Overfit: identification of overfitting regions according to train-test performance gap.
  6. Reliability: assessment of prediction uncertainty by split conformal prediction techniques.
  7. Robustness: evaluation of performance degradation under covariate noise perturbation.
  8. Resilience: evaluation of performance degradation under different out-of-distribution scenarios.

Installation | Examples | Usage | Citations

Installation

pip install PiML  

Low-code Examples

Click the ipynb links to run examples in Google Colab:

  1. BikeSharing data: ipynb
  2. CaliforniaHousing data: ipynb
  3. TaiwanCredit data: ipynb
  4. Fairness_SimuStudy1 data: ipynb
  5. Fairness_SimuStudy2 data: ipynb
  6. Upload custom data in two ways: ipynb
  7. Deal with external models: ipynb

Begin your own PiML journey with this demo notebook.

High-code Examples

The same examples can also be run by high-code APIs:

  1. BikeSharing data: ipynb
  2. CaliforniaHousing data: ipynb
  3. TaiwanCredit data: ipynb
  4. Model saving: ipynb
  5. Results return: ipynb

Low-code Usage on Google Colab

Stage 1: Initialize an experiment, Load and Prepare data

from piml import Experiment
exp = Experiment()
exp.data_loader()

exp.data_summary()

exp.data_prepare()

exp.data_quality()

exp.feature_select()

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

exp.model_fairness()

exp.model_fairness_compare()

Arbitrary Black-Box Modeling

For example, train a complex LightGBM with depth 7 and register it to the experiment:

from lightgbm import LGBMClassifier
exp.model_train(LGBMClassifier(max_depth=7), name='LGBM-7')

Then, compare it to inherently interpretable models (e.g. XGB2 and GAMI-Net):

exp.model_compare()

Citations

PiML, ReLU-DNN Aletheia and GAMI-Net

"PiML Toolbox for Interpretable Machine Learning Model Development and Diagnostics" (A. Sudjianto, A. Zhang, Z. Yang, Y. Su and N. Zeng, 2023) arXiv link

@article{sudjianto2023piml,
title={PiML Toolbox for Interpretable Machine Learning Model Development and Diagnostics},
author={Sudjianto, Agus and Zhang, Aijun and Yang, Zebin and Su, Yu and Zeng, Ningzhou},
year={2023}
}

"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}
}

Other Interpretable ML Models

"Fast Interpretable Greedy-Tree Sums (FIGS)" (Tan, Y.S., Singh, C., Nasseri, K., Agarwal, A. and Yu, B., 2022)

@article{tan2022fast,
title={Fast interpretable greedy-tree sums (FIGS)},
author={Tan, Yan Shuo and Singh, Chandan and Nasseri, Keyan and Agarwal, Abhineet and Yu, Bin},
journal={arXiv preprint arXiv:2201.11931},
year={2022}
}

"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}
}  

"Purifying Interaction Effects with the Functional ANOVA: An Efficient Algorithm for Recovering Identifiable Additive Models" (Lengerich, B., Tan, S., Chang, C.H., Hooker, G. and Caruana, R., 2020)

@inproceedings{lengerich2020purifying,
title={Purifying interaction effects with the functional anova: An efficient algorithm for recovering identifiable additive models},
author={Lengerich, Benjamin and Tan, Sarah and Chang, Chun-Hao and Hooker, Giles and Caruana, Rich},
booktitle={International Conference on Artificial Intelligence and Statistics},
pages={2402--2412},
year={2020},
organization={PMLR}
}

"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}
}
Nearby in the ranking
Similar items