plot_shap_dependence
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_dependence(shap_values: ndarray, features: ndarray, feature_index: int, *, feature_names: Sequence[str] | None = None, interaction_index: int | str = 'auto', title: str | None = None)[source]
SHAP dependence plot for one feature (pure; no filesystem).
- Parameters:
shap_values – Attribution matrix
(n_samples, n_features).features – Feature matrix aligned with
shap_values.feature_index – Column index to explain.
feature_names – Optional column names.
interaction_index – Color-by feature (
"auto"or a column index).title – Optional figure title; defaults to the feature name.
- Returns:
The matplotlib
Figure.