Registry / ai-ml / interpret

interpret

JSON →
library0.7.8pypypiunverified

InterpretML is an open-source Python library designed for training inherently interpretable models (glassbox models) and explaining black-box machine learning systems. It provides a unified API for various interpretability techniques, including Explainable Boosting Machines (EBMs), LIME, and SHAP, along with interactive visualizations to help users understand model behavior globally and locally. The library is actively maintained, with frequent minor releases (e.g., several in early 2026), and is currently at version 0.7.8.

pip install interpret
INSTALL
IMPORT
SIG · INTERPRET
I
interpret
ai-mlpythonv0.7.8
Install
29.6s avg
Import
5202ms
Disk
976MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 29.67s
py 3.11
✕ build_error
✓ 29.29s
py 3.12
✕ build_error
✓ 29.7s
py 3.13
✕ build_error
✓ 29.63s
py 3.9
✕ build_error
4/16 runs
976MB installed
● package 976MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ExplainableBoostingClassifier
from interpret.glassbox import ExplainableBoostingClassifier
ExplainableBoostingRegressor
from interpret.glassbox import ExplainableBoostingRegressor
show
from interpret import show
import interpret.show
`show` is a top-level function for displaying visualizations, imported directly.
ShapKernel
from interpret.blackbox import ShapKernel
PartialDependence
from interpret.blackbox import PartialDependence

This quickstart demonstrates how to train a glassbox model, specifically an Explainable Boosting Machine (EBM) Classifier, and generate a global explanation using the `interpret` library. It uses the Iris dataset, performs a train-test split, trains the EBM, and then calls `explain_global()` to get model insights. The `show()` function is used for interactive visualization, typically within a Jupyter notebook.

import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from interpret.glassbox import ExplainableBoostingClassifier from interpret import show from sklearn.datasets import load_iris # Load data data = load_iris() X = pd.DataFrame(data.data, columns=data.feature_names) y = pd.Series(data.target) # Split data X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20, random_state=42) # Train an Explainable Boosting Machine (EBM) classifier ebm = ExplainableBoostingClassifier(random_state=42) ebm.fit(X_train, y_train) # Get a global explanation for the model ebm_global = ebm.explain_global() # Display the global explanation (typically in a Jupyter environment) # show(ebm_global) print("Model training complete. To view explanations, uncomment 'show(ebm_global)' in a Jupyter environment.")
Debug
Known issues
breakingThe shape of the `bags` parameter in EBM fitting functions changed from `(n_outer_bags, n_samples)` to `(n_samples, n_outer_bags)`.
fix
Update your code to pass `bags` with the shape `(n_samples, n_outer_bags)`. Version 0.7.0 issues a warning and accepts the old format, but future versions may remove this compatibility.
affects: >=0.7.0
breakingThe `EBMUtils.merge_models` function was renamed to `merge_ebms`.
fix
Replace calls to `EBMUtils.merge_models` with `interpret.ebm.merge_ebms`.
affects: <0.5.0 (likely 0.3.0)
gotchaIncompatibility with scikit-learn 1.8+ due to changes in `is_classifier` and `is_regressor` only accepting valid estimators.
fix
Upgrade `interpret` to version 0.7.4 or later, which includes a fix for this incompatibility.
affects: 0.7.0 - 0.7.3
gotchaThe `ComputeProvider` abstraction was removed, simplifying the interface.
fix
If you were explicitly using `ComputeProvider`, you may need to adjust your code as this abstraction has been removed to simplify the API.
affects: 0.7.3 and later
gotchaWhen passing NumPy arrays to explainers, feature names are not automatically inferred. Visualizations might lack descriptive labels.
fix
Ensure the `feature_names` property is explicitly set when initializing the explainer or manually before calling an explain function. This is automatically handled when using Pandas DataFrames.
affects: All versions
Upgrade
Version history
0.7.8latest on PyPI · released Mar 17, 2026
Audit
Dependencies
pandasoptionalCommonly used for data handling with InterpretML models.
numpyoptionalUnderlying numerical operations, often used with pandas.
scikit-learnoptionalProvides familiar API for glassbox models and utilities.
shapoptionalFor SHapley Additive exPlanations, requires `interpret[shap]` install.
limeoptionalFor Local Interpretable Model-agnostic Explanations, requires `interpret[lime]` install.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
2
Resources
interpret — pip install interpret · libregistry