Skip to main content
Nori is accurate but, like any deep model, a black box. NoriInterpreter turns it into a standalone glass-box Explainable Boosting Machine (EBM / GA²M) — an additive model whose entire decision logic is a set of readable per-feature curves. You keep most of Nori’s accuracy but get a model you can inspect, ship, and audit line by line, which is often what a review or a regulated deployment actually needs. examples/explainability_credit.py
Needs the explainability extra (interpret-core, joblib, scipy). The SHAP-based importance path additionally needs the interpretability extra (shapiq).

How it works

A single fit(X, y) runs three steps and stores every artifact:
1

Measure importance

Fit Nori and score each raw input column by permutation importance — the drop in held-out skill when that column is shuffled.
2

Prune to what matters

Drop the low-importance columns, keeping the smallest subset that still retains ≥ retain (default 95%) of Nori’s skill.
3

Distill a glass-box

Fit an EBM on the surviving features. It learns one shape function per feature (plus a few pairwise interactions), so the whole model reads as baseline + Σ per-feature contributions.
The task (regression or classification) is auto-detected — Nori itself stays regression-only and scores the pruning, while the distilled EBM matches the target type.

Quickstart

Worked example — UCI Credit Default

examples/explainability_credit.py runs the full flow on the UCI Credit Default table (23 features, ~30k rows, downloaded fresh). The permutation ranking is dominated by PAY_0 — the most recent repayment status — with the credit limit and earlier repayment months trailing it:
Nori feature importance bar chart for the credit-default dataset

Nori-permutation importance (top 10). PAY_0 — the latest repayment status — carries most of the signal; importance = drop in test AUC when that column is shuffled.

Pruning keeps 7 of 23 features at the 95% bar, and distilling those into an EBM costs very little: Nori scores AUC 0.781 on all features, and the glass-box EBM reaches 0.766 on the 7 it kept. The distilled model is fully legible — each middle panel is one feature’s contribution to the predicted default probability, the right-hand heatmaps are pairwise interactions, and the Σ → σ node adds the baseline and every contribution into the final prediction:
Glass-box EBM model diagram distilled from Nori on the credit-default dataset

The distilled glass-box EBM (7 features, test AUC 0.766). Read left-to-right: each shape function maps a feature's value to how much it pushes default probability up (+) or down (−); grey bars show where the data is dense (trustworthy) vs sparse (extrapolated); Σ then σ combine the baseline and all contributions into ŷ.

Configuration

For finer control, the same steps are exposed as standalone functions — import from the submodules: explainability.importance (nori_permutation_importance, nori_shap_importance), explainability.ebm (fit_ebm, ebm_structure), and explainability.pipeline (run, the end-to-end importance → EBM driver).

Good to know

  • Runs on the local Python package (synthefy-nori), not the hosted API.
  • Nori remains the source of truth for accuracy — the EBM is a faithful, auditable approximation on the selected features, so expect a small score gap (≈0.01 AUC on the credit example).
  • For single-prediction attributions, feature interactions, and partial dependence, see Explainability.

Next steps

Explainability

SHAP / Shapley values, interactions, PDP, and feature selection.

Categorical & Ordinal Targets

Predict labels on a discrete scale instead of a continuous estimate.