plot_shap_waterfall
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- plot_shap_waterfall(shap_values: ndarray, features: ndarray, sample_index: int, *, feature_names: Sequence[str] | None = None, base_value: float = 0.0, title: str | None = None)[source]
Per-sample SHAP waterfall explanation (pure; no filesystem).
- Parameters:
shap_values – Attribution matrix
(n_samples, n_features).features – Feature matrix aligned with
shap_values.sample_index – Row to explain.
feature_names – Optional column names.
base_value – Explainer base value (positive class).
title – Optional figure title.
- Returns:
The matplotlib
Figure.