Principle:Interpretml Interpret Explanation Preservation
| Metadata | |
|---|---|
| Sources | InterpretML |
| Domains | Visualization, Reporting |
| Last Updated | 2026-02-07 12:00 GMT |
Overview
A persistence mechanism that saves interactive model explanations to static files for sharing, archiving, and offline review.
Description
Explanation Preservation converts interactive visualizations into static, shareable formats. It handles Plotly figures (saved as standalone HTML), DataFrames (saved as HTML tables), and raw HTML strings. This enables model explanations to be included in reports, shared with stakeholders who don't have Python environments, or archived for compliance purposes.
Usage
Use this principle when model explanations need to persist beyond the current session, be shared with non-technical stakeholders, or be embedded in reports and documentation.
Theoretical Basis
The preservation follows a type-dispatch pattern:
- Inspect the visualization object type
- For Plotly figures: use plotly.offline.plot() to generate standalone HTML
- For DataFrames: use pandas to_html()
- For HTML strings: write directly
- If file_name is None, render inline in the current notebook cell