Interpretable models
Use this skill when the request is for a model whose prediction mechanism is
itself inspectable, a compact prototype set, an explicit rule list, a
comparison of two models, a label-plus-teaching explanation, or a conceptual
neural interpretability method. This skill covers AIX360 0.3.0 APIs and their
optional dependency boundaries.
Route before coding
- Explain an already trained black box with LIME, SHAP, GroupedCE, or a
neural contrastive method: route to
../local-black-box/SKILL.md.
- CEM, recourse, certification, or optimal transport: route to
../counterfactual-and-certification/SKILL.md.
- Time-series explainers: route to
../time-series/SKILL.md.
- Dataset loading, preprocessing, or metric contracts: route to
../datasets-and-metrics/SKILL.md.
Do not call a rule learner an explainer of an existing model: BRCG, GLRM,
RIPPER, CoFrNet, and TED fit a predictive mechanism from labeled data. IMD
consumes outputs from two already-fitted models. ProtoDash selects exemplars
from a candidate set and can summarize data or support a local comparison.
DIPVAE edits a learned latent generative model. ProfWeight trains a simpler
model using confidence-derived sample weights.
Operating sequence
- State the object being produced: prototypes, binary/regression rule model,
DNF rules, model-difference regions, label/explanation pair, or a latent or
confidence-profile model.
- Freeze the training schema. Keep column names and ordering stable; retain
the fitted
FeatureBinarizer/FeatureBinarizerFromTrees for every later
transform. Decide how missing values are represented before fitting.
- Select the smallest dependency family in
api-reference.md. Treat optional legacy
families as unavailable unless their imports and versions are proven.
- Fit only on training data, then predict or explain on a separately
transformed/evaluated set. Check output shape, labels/classes, feature names,
and rule count before interpreting the result.
- Save a portable semantic summary (rule strings, prototype source indices and
weights, diff regions, or latent edit settings), not an opaque live object.
- Report accuracy/coverage or other metrics separately from readability. A
compact model is not automatically faithful to another model.
Fast choices
- Prototype selection:
ProtodashExplainer.explain(X, Y, m, ...) returns
(weights, indices, objective_history); Y is the candidate pool and X
is the data being summarized/explained.
- Binary rule classifier: binarize a pandas frame, fit
BooleanRuleCG through BRCGExplainer, then call predict and explain.
- Interpretable regression/classification: use
LinearRuleRegression or
LogisticRuleRegression through GLRMExplainer; call predict (and
predict_proba for logistic) and inspect the coefficient DataFrame.
- Native rule induction: fit
RipperExplainer on a pandas DataFrame and
Series, with target_label for a binary positive class; call explain()
for a TRXF DnfRuleSet.
- Model differencing: obtain aligned predictions from two classifiers on
the same pandas frame, fit
IMDExplainer.fit(X, y1, y2, max_depth=...), and
inspect diffrules, diffregions, and metrics.
- Teaching explanations: fit
TED_CartesianExplainer(base_estimator) on
(X, Y, E) where explanation ids are dense non-negative integers; use
predict_explain, predict, and explain.
- Optional neural methods: use CoFrNet for continued-fraction network
structure, DIPVAE for latent edits, and ProfWeight for confidence-profile
weighted simple models only after their backend environments are validated.
Hard safety checks
FeatureBinarizerFromTrees.fit requires y, rejects NaN/None during fit,
and its transform schema is learned from selected input features. A missing
selected column is a schema error, not a signal to silently impute.
BRCG solves LPs and can emit no useful clauses; inspect w, z, and the
rules list rather than assuming a non-empty explanation.
- ProtoDash weights are non-negative but unnormalized; zero, repeated, or
numerically unstable weights need a smaller candidate set, finite scaled
inputs, or the alternate optimizer.
- TRXF predicates use
Feature, Predicate, Conjunction, and DnfRuleSet.
Preserve typed values and operators when serializing; do not use repr as a
persistence format.
- Do not promise compatibility for legacy TensorFlow/Keras 1.x ProfWeight or
the optional PyTorch CoFrNet/DIPVAE code from a modern environment without a
separate probe. See troubleshooting.md.
For concrete call signatures, output contracts, dependency boundaries, and
recovery procedures, read the four bundled references. The tiny smoke helper
is at scripts/feature_binarizer_smoke.py and is safe to run locally with
--help before running it.
1---2name: interpretable-models3description: "Choose and operate AIX360's directly interpretable models, rule4 learners, prototypes, model differencing, teaching explanations, and optional5 neural interpretable methods."6disable-model-invocation: true7metadata:8 source: https://skillmd.com/skills/vectorspacelab/interpretable-models9 disco-role: operating10license: Apache 2.011---1213# Interpretable models1415Use this skill when the request is for a model whose prediction mechanism is16itself inspectable, a compact prototype set, an explicit rule list, a17comparison of two models, a label-plus-teaching explanation, or a conceptual18neural interpretability method. This skill covers AIX360 0.3.0 APIs and their19optional dependency boundaries.2021## Route before coding2223- **Explain an already trained black box with LIME, SHAP, GroupedCE, or a24 neural contrastive method:** route to `../local-black-box/SKILL.md`.25- **CEM, recourse, certification, or optimal transport:** route to26 `../counterfactual-and-certification/SKILL.md`.27- **Time-series explainers:** route to `../time-series/SKILL.md`.28- **Dataset loading, preprocessing, or metric contracts:** route to29 `../datasets-and-metrics/SKILL.md`.3031Do not call a rule learner an explainer of an existing model: BRCG, GLRM,32RIPPER, CoFrNet, and TED fit a predictive mechanism from labeled data. IMD33consumes outputs from two already-fitted models. ProtoDash selects exemplars34from a candidate set and can summarize data or support a local comparison.35DIPVAE edits a learned latent generative model. ProfWeight trains a simpler36model using confidence-derived sample weights.3738## Operating sequence39401. State the object being produced: prototypes, binary/regression rule model,41 DNF rules, model-difference regions, label/explanation pair, or a latent or42 confidence-profile model.432. Freeze the training schema. Keep column names and ordering stable; retain44 the fitted `FeatureBinarizer`/`FeatureBinarizerFromTrees` for every later45 transform. Decide how missing values are represented before fitting.463. Select the smallest dependency family in47 [api-reference.md](references/api-reference.md). Treat optional legacy48 families as unavailable unless their imports and versions are proven.494. Fit only on training data, then predict or explain on a separately50 transformed/evaluated set. Check output shape, labels/classes, feature names,51 and rule count before interpreting the result.525. Save a portable semantic summary (rule strings, prototype source indices and53 weights, diff regions, or latent edit settings), not an opaque live object.546. Report accuracy/coverage or other metrics separately from readability. A55 compact model is not automatically faithful to another model.5657## Fast choices5859- **Prototype selection:** `ProtodashExplainer.explain(X, Y, m, ...)` returns60 `(weights, indices, objective_history)`; `Y` is the candidate pool and `X`61 is the data being summarized/explained.62- **Binary rule classifier:** binarize a pandas frame, fit63 `BooleanRuleCG` through `BRCGExplainer`, then call `predict` and `explain`.64- **Interpretable regression/classification:** use `LinearRuleRegression` or65 `LogisticRuleRegression` through `GLRMExplainer`; call `predict` (and66 `predict_proba` for logistic) and inspect the coefficient DataFrame.67- **Native rule induction:** fit `RipperExplainer` on a pandas `DataFrame` and68 `Series`, with `target_label` for a binary positive class; call `explain()`69 for a TRXF `DnfRuleSet`.70- **Model differencing:** obtain aligned predictions from two classifiers on71 the same pandas frame, fit `IMDExplainer.fit(X, y1, y2, max_depth=...)`, and72 inspect `diffrules`, `diffregions`, and `metrics`.73- **Teaching explanations:** fit `TED_CartesianExplainer(base_estimator)` on74 `(X, Y, E)` where explanation ids are dense non-negative integers; use75 `predict_explain`, `predict`, and `explain`.76- **Optional neural methods:** use CoFrNet for continued-fraction network77 structure, DIPVAE for latent edits, and ProfWeight for confidence-profile78 weighted simple models only after their backend environments are validated.7980## Hard safety checks8182- `FeatureBinarizerFromTrees.fit` requires `y`, rejects NaN/None during fit,83 and its transform schema is learned from selected input features. A missing84 selected column is a schema error, not a signal to silently impute.85- `BRCG` solves LPs and can emit no useful clauses; inspect `w`, `z`, and the86 `rules` list rather than assuming a non-empty explanation.87- ProtoDash weights are non-negative but unnormalized; zero, repeated, or88 numerically unstable weights need a smaller candidate set, finite scaled89 inputs, or the alternate optimizer.90- TRXF predicates use `Feature`, `Predicate`, `Conjunction`, and `DnfRuleSet`.91 Preserve typed values and operators when serializing; do not use `repr` as a92 persistence format.93- Do not promise compatibility for legacy TensorFlow/Keras 1.x ProfWeight or94 the optional PyTorch CoFrNet/DIPVAE code from a modern environment without a95 separate probe. See [troubleshooting.md](references/troubleshooting.md).9697For concrete call signatures, output contracts, dependency boundaries, and98recovery procedures, read the four bundled references. The tiny smoke helper99is at `scripts/feature_binarizer_smoke.py` and is safe to run locally with100`--help` before running it.