Implementation:Interpretml Interpret ExportableEBMModel
Appearance
| Field | Value |
|---|---|
| Sources | Repo: InterpretML |
| Domains | Reporting, Interpretability |
| Updated | 2026-02-07 |
Overview
Concrete tool for exporting a fitted EBM to an Excel workbook with embedded charts provided by the InterpretML library.
Description
The ExportableEBMModel class creates an Excel workbook using xlsxwriter. After initialization with a fitted EBM and output path, calling generate() creates Overview, Variables, and Evaluation worksheets with embedded matplotlib/seaborn charts. Calling save() writes the workbook to disk.
Usage
Use this when generating audit-ready Excel reports from trained EBM models.
Code Reference
| Field | Value |
|---|---|
| Source | interpretml/interpret |
| File | python/interpret-core/interpret/glassbox/_ebm/_excel.py |
| Lines | 1870-1985 |
Signature:
class ExportableEBMModel:
def __init__(self, ebm_model, output_file: str, author: str = "", date_stamp: str = ""):
def generate(self) -> None:
def save(self) -> None:
Import:
from interpret.glassbox._ebm._excel import ExportableEBMModel
I/O Contract
Init Inputs:
| Parameter | Type | Required | Description |
|---|---|---|---|
| ebm_model | fitted EBM | Yes | A fitted ExplainableBoostingClassifier or ExplainableBoostingRegressor instance |
| output_file | str | Yes | File path for the output .xlsx file |
| author | str | No | Author name for the report metadata |
| date_stamp | str | No | Date stamp for the report metadata |
generate() Outputs:
| Type | Description |
|---|---|
| None | Creates worksheets in memory |
save() Outputs:
| Type | Description |
|---|---|
| None | Writes .xlsx file to disk at the specified output_file path |
Usage Examples
from interpret.glassbox import ExplainableBoostingClassifier
from interpret.glassbox._ebm._excel import ExportableEBMModel
ebm = ExplainableBoostingClassifier()
ebm.fit(X_train, y_train)
exporter = ExportableEBMModel(ebm, "model_report.xlsx", author="Data Science Team")
exporter.generate()
exporter.save()
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment