two functions, that's itexplain_weights = global · explain_prediction = local
explain ≠ formatexplain_* → Explanation object → format_as_html/text/dict/dataframe/image
show_* needs IPythonplain script → AttributeError. Use explain_* + format_as_*
<BIAS> = the starting pointtraining mean (trees) / intercept (linear) — not noise
BIAS + contribs == predict()exactly — an algebraic decomposition, not a sampled estimate
pass vec= for textunlocks word highlighting · without it you get x8231
Pipelines work directlyhand explain_prediction the whole pipeline — it finds the vectorizer
cv='prefit' is the DEFAULTPermutationImportance won't refit — pass an already-fitted model
perm.fit(X_test, y_test)never on train — verified: fake importances on train, 0.000 on test
impurity importance is biasedfavours high-cardinality features · prefer permutation on held-out data
check te.metrics_bad LIME surrogate fit → the explanation is fiction, rendered beautifully
correlated features hidepermutation makes duplicated signal look unimportant on both features
weight 0 ≠ irrelevantin a tree it means "not on this row's decision path"
explain_weights_dfskip HTML entirely — straight to a pandas DataFrame
eli5 is NOT deadeli5-org/eli5 0.16.0 runs on sklearn 1.8 · old TeamHG-Memex stalled at 0.13
eli5 debugs, SHAP auditseli5 for text + fast exact checks · SHAP for axiomatic attributions