Interpret

Fit interpretable models. Explain blackbox machine learning.

Last verified:

Visit Interpret

What is Interpret?

InterpretML (also called Interpret) is an open-source Python toolkit designed to help data scientists, researchers, auditors, and business leaders understand machine learning models and enable responsible machine learning. It provides state-of-the-art interpretability techniques through a unified API and rich interactive visualizations, supporting both training interpretable glassbox models and explaining existing blackbox ML pipelines.

Key features include glassbox models like Explainable Boosting Machine (EBM), linear models, and decision trees that produce lossless explanations and are editable by domain experts. For blackbox models like deep neural networks, it offers explainers such as LIME and SHAP that analyze input-output relationships. The toolkit supports global explanations (overall model behavior), local explanations (individual predictions), subset explanations, and what-if analysis to see how feature changes impact predictions.

InterpretML is designed for data scientists who need to debug models and explain predictions to stakeholders, auditors who validate models before and after deployment, business leaders who need transparency about predictions for customers, and researchers who want to compare interpretability algorithms. It works across Windows, Mac, and Linux on Python 3.5+, with visualizations that work best in Jupyter notebook environments.

Interpret pricing

Pricing model: Freemium

InterpretML is completely free and open-source under the MIT license. It is a community-driven open source toolkit with no paid plans or tiers. Users can pip install interpret or conda install -c conda-forge interpret at no cost. The source code is available on GitHub at github.com/microsoft/interpret.

Interpret pros

  • Open-source toolkit with MIT license
  • Unified API for multiple interpretability algorithms
  • Explainable Boosting Machine as accurate as blackbox models
  • Glassbox models produce lossless exact explanations
  • Interactive rich visualizations with Plotly Dash
  • Supports both global and local explanations
  • Works with scikit-learn interface
  • No special preprocessing required for data
  • Automatic interaction detection in EBM
  • Fast prediction times for EBM in production
  • Multi-core and multi-machine parallelization
  • Can explain any ML pipeline including ensembles
  • Built-in extensible visualization platform
  • Supports what-if analysis for feature impact
  • Community-driven with active contribution

Interpret cons

  • EBM training is slower than similar methods due to additivity
  • Visualizations require Jupyter notebook-like environments
  • Blackbox explainers produce approximate explanations
  • Blackbox explanations may be inaccurate in high-stakes environments
  • Does not yet support image or text data
  • No p-values for EBM term significance yet
  • InlineProvider has slower performance than default
  • Full interpret dashboard unsupported with InlineProvider

Frequently asked questions about Interpret

Why doesn't anything happen when I run show(...)?

Interpret's visualizations work best in Jupyter notebook-like environments (Jupyter notebook, VS Code, Colab). If running show() from a command line script, you may not render visualizations directly - check console output for a browser link. By default, Interpret hosts visualizations on a local web server using Plotly Dash. In restricted environments, you can manually embed visualizations with InlineProvider by setting the visualize provider.

How do I generate the full interpret dashboard instead of the small dropdown?

Make sure you are passing in a list of explanations to show. You can pass a single explanation wrapped in a list. For example, show(ebm_local) returns a small dropdown, while show([ebm_local]) produces the full interpret dashboard.

How can I extract the underlying data used to visualize explanations?

Every explanation object supports a .data() method that returns a JSON-compatible dictionary of the underlying data. Most explanations contain many visualizations - explain_local() produces visualizations for each individual instance. Use explanation.data(0) for the first visualization, or explanation.data(-1) to return data for all visualizations.

What does the density at the bottom of each graph mean?

The density is a histogram describing the data distribution for that feature, estimated using any data passed into the explain_* methods. It helps understand how much data is in each region of the feature space when visualizing explanations, as models can perform very differently with large and small samples.

Does interpret support explainability for image and text data?

Not yet, but keep an eye out for future releases. Currently the toolkit focuses on tabular data interpretability.

Should I be parameter tuning EBMs and what parameters should I tune?

Default parameters perform reasonably well on most problems. For best models, set outer_bags and inner_bags to 25 or more each (slows training but produces smoother graphs). For overfitting, reduce max_bins for smaller datasets or make early stopping more aggressive. For underfit models, increase max_bins and max_rounds. Sweep max_bins between 32-1024 and max_leaves from 2-5 for general tuning.

What does the error bar on an EBM graph mean?

Error bars are rough estimates of model uncertainty in each region of feature space. A large error bar means the learned function may change substantially with minor training data changes. Size is determined by training data amount in that region and inherent model uncertainty. By default, EBM trains 8 mini-EBMs on random 85% subsamples, and the standard deviation becomes the error bar.

What's the difference between EBMs in classification and regression?

Classification EBMs use a logistic link function because probabilities are not additive - they train in logit space where feature contributions are additive, then convert to bounded probability at prediction. For ExplainableBoostingClassifier, y-axis values are in log-odds. Regression EBMs have y-axis values directly in target units (e.g., housing dollars), requiring no transformations.

How can I serialize EBMs and use them in production?

For full functionality, use pickle to serialize and deserialize EBM objects. Explanations can be serialized as JSON through the data method. There is also an ebm2onnx package available (pip install ebm2onnx) that enables high-speed inference on EBM objects through ONNX compatible runtimes.

How do I get help or contribute to InterpretML?

For most questions, raise a GitHub issue so other users can benefit from solutions. For private questions, email the maintainers. For code contributions, read the contribution guidelines and send a pull request. For feature requests or idea discussions, raise a GitHub issue.

Categories

Use cases

Browse all AI tools on NeedAnAI