Skip to main content
Understand why Nori made a prediction: which features drove it, how they interact, and how the model responds across a feature’s range. Because NoriRegressor is a scikit-learn estimator, it plugs directly into shapiq — a fast SHAP implementation with native Shapley-interaction support — and the rest of the sklearn interpretability ecosystem. The helpers in synthefy_nori.interpretability are thin convenience wrappers, so you can also use the underlying tools directly. examples/interpretability_regression.py
These examples run locally with the synthefy-nori package and its interpretability extra, which pulls in shapiq. Follow Installation before running them.
Nori is regression-only, so every method below explains the regression predictive mean.

Quickstart

get_nori_imputation_explainer builds a shapiq.TabularExplainer that removes features by imputation against a background set. The training context stays fixed across coalitions, so each coalition is a single predict call and the cost is set by budget.
SHAP waterfall plot for a single Nori prediction

SHAP waterfall — each feature's additive push from the baseline to one prediction (sklearn diabetes).

Feature interactions

Use a separate explainer with index="k-SII", max_order=2 for pairwise interactions, which you can view as a network:
Feature interaction network with a legend: red/pink nodes and lines contribute positively, blue nodes and lines negatively; larger nodes represent stronger main effects and thicker lines represent stronger pairwise interactions

Pairwise interactions for one Nori prediction.

Partial dependence / ICE

Pass (i, j) tuples in features for 2-D interaction surfaces. Returns an sklearn PartialDependenceDisplay.
Two partial-dependence plots showing average predicted diabetes progression after one year against scaled BMI and blood-pressure values

Top: vary BMI. Bottom: vary average blood pressure. Both y-axes show the average predicted diabetes progression score one year after baseline. Other features retain their observed test-row values before predictions are averaged.

Feature selection

Find a minimal feature subset that preserves cross-validated performance (sequential selection):
n_features_to_select accepts an int, a fraction, or "auto" (with tol). The result also reports baseline-vs-selected CV scores.
Sequential selection re-fits Nori in-context on every CV split, so keep it to a few thousand samples and a modest feature count.

Configuration

Budget trades accuracy for cost. Start at 128 and raise only if the explanation looks noisy: <10 features → 64–128; 10–20 → 128–512; 20+ → 512–2048.

Good to know

  • These run on the local Python package (synthefy-nori), not the hosted API.
  • TabPFN’s fast Shapley path reuses a KV-cache across coalitions; Nori’s public package runs one forward per coalition, which is correct and budget-controlled, just not cache-accelerated.

Next steps

Glass-box Models

Distill Nori into a readable, shippable additive model (EBM) in one call.

Categorical & Ordinal Targets

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

Embeddings

Target-aware row vectors for probing, clustering, and search.