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
py 3.10
✕ build_error
✓ 18.4s
py 3.11
✕ build_error
✓ 18.25s
py 3.12
✕ build_error
✓ 18.85s
py 3.13
✕ build_error
✓ 18.8s
py 3.9
✕ build_error
1/2 runs
578MB installed
● package 578MB
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
✗ from interpret.visualize import show
The `show` function for visualizations is directly available from the top-level `interpret` package, not a submodule like `visualize`.
This quickstart demonstrates how to train an Explainable Boosting Machine (EBM) for a classification task and generate both global and local explanations. It covers data preparation, model fitting, and accessing explanation data programmatically. For interactive visualizations, `show(explanation_object)` would be used in a compatible environment like 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
# Generate some synthetic data
np.random.seed(0)
X = pd.DataFrame({
'feature_a': np.random.rand(100) * 10,
'feature_b': np.random.randint(0, 3, 100).astype(str),
'feature_c': np.random.randn(100)
})
y = (X['feature_a'] + (X['feature_b'].astype(int) * 2) + np.random.randn(100) > 10).astype(int)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Initialize and fit an Explainable Boosting Machine (EBM)
ebm = ExplainableBoostingClassifier(random_state=42)
ebm.fit(X_train, y_train)
# Get global explanations (feature importances and shapes)
ebm_global = ebm.explain_global()
# In a notebook environment, you would call show(ebm_global) to visualize
# For script execution, we can print summary or a representation of the explanation
print(f"Global Explanation for EBM:\n{ebm_global.data()}")
# Get local explanations for a specific sample
ebm_local = ebm.explain_local(X_test[:1], y_test[:1])
print(f"\nLocal Explanation for first test sample:\n{ebm_local.data()}")
Debug
Known issues
breakingThe shape of the `bags` parameter in EBMs was changed from (n_outer_bags, n_samples) to (n_samples, n_outer_bags). In v0.7.0, the old format issued a warning and was accepted, but this behavior may be fully deprecated or removed in future major versions.fixEnsure the `bags` parameter is passed with the shape (n_samples, n_outer_bags) to align with `X` parameter's shape.
affects: v0.7.0 and later
breakingThe `ComputeProvider` abstraction was removed in v0.7.3, simplifying the interface. Code relying on this abstraction will break.fixRefactor code to remove dependencies on `ComputeProvider`. Refer to the latest documentation for the updated simplified interface.
affects: v0.7.3 and later
gotchaOlder versions of `interpret-core` (prior to v0.7.4) had incompatibilities with `scikit-learn` versions 1.8 and above, specifically due to changes in `is_classifier` and `is_regressor` only accepting valid estimators.fixUpgrade `interpret-core` to v0.7.4 or newer to resolve `scikit-learn` compatibility issues. Alternatively, pin `scikit-learn` to a version below 1.8 if an upgrade is not possible.
affects: < v0.7.4
gotchaWhen using NumPy arrays as input to explainers, feature names might not appear in visualizations. This occurs because NumPy arrays lack inherent column names.fixPass a Pandas DataFrame with meaningful column names, or explicitly set the `feature_names` property when initializing or calling explain functions for array inputs.
affects: All versions
gotchaFor `ExplainableBoostingClassifier`, the y-axis values in the generated global explanation graphs are in 'logit' space, not direct probabilities. This requires careful interpretation for classification tasks.fixRemember that the y-axis represents log-odds (logits). Positive values push towards the positive class, but transformations are needed to convert to probabilities if desired for direct comparison.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'interpret.glassbox.ebm'
This error occurs when attempting to import specific components like Explainable Boosting Machines (EBMs) without having installed the necessary 'ebm' extra alongside `interpret-core` or if the full `interpret` package is not installed.
fixInstall `interpret-core` with the 'ebm' extra: `pip install interpret-core[ebm]` or install the full `interpret` package: `pip install interpret`.
AttributeError: 'ExplainableBoostingRegressor' object has no attribute 'feature_names_in_'
This error typically arises when attempting to access feature names from an EBM model, especially after fitting it with a NumPy array without explicitly providing `feature_names` during initialization, or due to changes in the scikit-learn compatible API where `feature_names_in_` is populated after `fit`.
fixEnsure `feature_names` are passed to the `ExplainableBoostingRegressor` or `ExplainableBoostingClassifier` constructor if using NumPy arrays, or use a Pandas DataFrame which retains column names. If using a recent version, access `model.term_names_` for learned term names, or `model.feature_names_in_` after `fit` if feature names were explicitly provided or inferred.
OSError: [WinError 126] The specified module could not be found
This Windows-specific error indicates that `interpret-core` failed to load its underlying native (C++) libraries, often due to an incomplete or corrupted installation, or missing system dependencies like Visual C++ Redistributables.
fixReinstall `interpret-core` using `pip install --no-cache-dir interpret-core` to ensure a clean install. Verify that all required system-level runtime libraries (like Visual C++ Redistributable for Visual Studio) are installed on your Windows system.
Upgrade
Version history
0.7.8latest on PyPI · released Mar 17, 2026
Audit
Dependencies
numpyrequiredFundamental for numerical operations and data handling.
scipyrequiredOften used alongside numpy for scientific computing functionalities.
scikit-learnrequiredProvides common ML estimators and utilities, ensuring compatibility with the broader ecosystem.
pandasrequiredFor flexible data structures and analysis, although optimized handling exists if not installed.
joblibrequiredUsed for efficient parallel computing and caching.
dashoptionalOptional, for interactive visualizations in notebooks/web apps.
plotlyoptionalOptional, for rich interactive data visualizations.
limeoptionalOptional, for LIME explainer integration.
shapoptionalOptional, for SHAP explainer integration.