# interpretml/interpret architecture

> Architecture diagram of the GitHub repository interpretml/interpret, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/interpretml/interpret
- Repository: https://github.com/interpretml/interpret

## Overview

InterpretML is a machine-learning interpretability package: users fit interpretable glassbox models or explain blackbox predictors, inspect global or per-prediction explanations, and visualize or compare them. The documented EBM workflow includes fitting, explanation generation, and display; other README-listed techniques form parallel model and explainer branches. EBM relies on shared native computation, while privacy-preserving EBMs and performance measures are additional capabilities. The graph follows the README and repository paths; sampled source excerpts are partial, so uncertain internal call wiring is omitted.

Main entry points: [`python/interpret-core/interpret/utils/_explanation.py`](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/utils/_explanation.py) (Explanation Objects), [`python/interpret-core/interpret/glassbox/_ebm.py`](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/glassbox/_ebm.py) (Explainable Boosting), [`python/interpret-core/interpret/blackbox`](https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/blackbox) (Blackbox Explainers), [`python/interpret-core/interpret/greybox`](https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/greybox) (Greybox Explainers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_models["Glassbox Models"]
  node_ebm["Explainable Boosting<br/>[_ebm.py]"]
  node_other_models["Other Glassbox Models"]
end

subgraph group_explainers["Blackbox and Greybox"]
  node_blackbox["Blackbox Explainers"]
  node_greybox["Greybox Explainers"]
end

subgraph group_compute["Model Computation"]
  node_clean["Data Preparation<br/>[_clean_x.py]"]
  node_native["Native EBM Engine"]
end

subgraph group_inspect["Explanation and Inspection"]
  node_explanation["Explanation Objects<br/>[_explanation.py]"]
  node_provider["Visualization Provider<br/>[_visualize.py]"]
  node_interactive["Interactive Views<br/>[_interactive.py]"]
  node_dashboard["Comparison Dashboard<br/>[dashboard.py]"]
  node_performance["Performance Measures"]
end

subgraph group_extensions["Privacy and Extensions"]
  node_dp_ebm["Differentially Private EBM<br/>[_dpebm.py]"]
  node_extension_api["Extension API<br/>[extension.py]"]
end

node_user(("Data Scientist"))
node_inputs["Training Data"]
node_model["Blackbox Predictor"]
node_plotting["Plotting Libraries"]

node_user -->|"provides"| node_inputs
node_inputs -->|"prepares"| node_clean
node_clean -->|"feeds training"| node_ebm
node_ebm -->|"uses computation"| node_native
node_ebm -->|"explains globally or locally"| node_explanation
node_user -->|"fits model"| node_other_models
node_other_models -->|"generates explanation"| node_explanation
node_user -->|"requests explanation"| node_blackbox
node_model -->|"provides predictions"| node_blackbox
node_blackbox -->|"produces explanation"| node_explanation
node_user -->|"requests explanation"| node_greybox
node_model -->|"provides model behavior"| node_greybox
node_greybox -->|"produces explanation"| node_explanation
node_user -->|"fits private model"| node_dp_ebm
node_dp_ebm -->|"explains model"| node_explanation
node_user -->|"displays explanation"| node_provider
node_explanation -->|"supplies view data"| node_provider
node_provider -->|"dispatches visualization"| node_interactive
node_interactive -.->|"renders plots"| node_plotting
node_user -->|"compares explanations"| node_dashboard
node_explanation -->|"supplies comparisons"| node_dashboard
node_user -->|"evaluates model"| node_performance
node_user -->|"loads extensions"| node_extension_api

click node_clean "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/utils/_clean_x.py"
click node_ebm "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/glassbox/_ebm.py"
click node_other_models "https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/glassbox"
click node_native "https://github.com/interpretml/interpret/tree/main/shared/libebm"
click node_blackbox "https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/blackbox"
click node_greybox "https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/greybox"
click node_explanation "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/utils/_explanation.py"
click node_provider "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/provider/_visualize.py"
click node_interactive "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/visual/_interactive.py"
click node_dashboard "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/visual/dashboard.py"
click node_performance "https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/perf"
click node_dp_ebm "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/privacy/_dpebm.py"
click node_extension_api "https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/ext/extension.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ebm,node_other_models toneBlue
class node_blackbox,node_greybox toneAmber
class node_clean,node_native toneMint
class node_explanation,node_provider,node_interactive,node_dashboard,node_performance toneRose
class node_dp_ebm,node_extension_api,node_user,node_inputs,node_model,node_plotting toneIndigo
```

## Components

### Glassbox Models

- [Explainable Boosting](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/glassbox/_ebm.py): `python/interpret-core/interpret/glassbox/_ebm.py`
- [Other Glassbox Models](https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/glassbox): `python/interpret-core/interpret/glassbox`

### Blackbox and Greybox

- [Blackbox Explainers](https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/blackbox): `python/interpret-core/interpret/blackbox`
- [Greybox Explainers](https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/greybox): `python/interpret-core/interpret/greybox`

### Model Computation

- [Data Preparation](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/utils/_clean_x.py): `python/interpret-core/interpret/utils/_clean_x.py`
- [Native EBM Engine](https://github.com/interpretml/interpret/tree/main/shared/libebm): `shared/libebm`

### Explanation and Inspection

- [Explanation Objects](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/utils/_explanation.py): `python/interpret-core/interpret/utils/_explanation.py`
- [Visualization Provider](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/provider/_visualize.py): `python/interpret-core/interpret/provider/_visualize.py`
- [Interactive Views](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/visual/_interactive.py): `python/interpret-core/interpret/visual/_interactive.py`
- [Comparison Dashboard](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/visual/dashboard.py): `python/interpret-core/interpret/visual/dashboard.py`
- [Performance Measures](https://github.com/interpretml/interpret/tree/main/python/interpret-core/interpret/perf): `python/interpret-core/interpret/perf`

### Privacy and Extensions

- [Differentially Private EBM](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/privacy/_dpebm.py): `python/interpret-core/interpret/privacy/_dpebm.py`
- [Extension API](https://github.com/interpretml/interpret/blob/main/python/interpret-core/interpret/ext/extension.py): `python/interpret-core/interpret/ext/extension.py`

### Other components

- **Data Scientist**
- **Training Data**
- **Blackbox Predictor**
- **Plotting Libraries**

## Connections

- Data Scientist → Training Data: provides
- Training Data → Data Preparation: prepares
- Data Preparation → Explainable Boosting: feeds training
- Explainable Boosting → Native EBM Engine: uses computation
- Explainable Boosting → Explanation Objects: explains globally or locally
- Data Scientist → Other Glassbox Models: fits model
- Other Glassbox Models → Explanation Objects: generates explanation
- Data Scientist → Blackbox Explainers: requests explanation
- Blackbox Predictor → Blackbox Explainers: provides predictions
- Blackbox Explainers → Explanation Objects: produces explanation
- Data Scientist → Greybox Explainers: requests explanation
- Blackbox Predictor → Greybox Explainers: provides model behavior
- Greybox Explainers → Explanation Objects: produces explanation
- Data Scientist → Differentially Private EBM: fits private model
- Differentially Private EBM → Explanation Objects: explains model
- Data Scientist → Visualization Provider: displays explanation
- Explanation Objects → Visualization Provider: supplies view data
- Visualization Provider → Interactive Views: dispatches visualization
- Interactive Views → Plotting Libraries: renders plots
- Data Scientist → Comparison Dashboard: compares explanations
- Explanation Objects → Comparison Dashboard: supplies comparisons
- Data Scientist → Performance Measures: evaluates model
- Data Scientist → Extension API: loads extensions
