plot_shap_violin
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_violin(shap_values: ndarray, features: ndarray, *, feature_names: Sequence[str] | None = None, title: str = 'SHAP violin', max_display: int = 20)[source]
Violin-style SHAP summary (
summary_plot(plot_type='violin')).- Parameters:
shap_values – Attribution matrix
(n_samples, n_features).features – Feature matrix aligned with
shap_values.feature_names – Optional column names.
title – Figure title (sanitised).
max_display – Maximum number of features to show.
- Returns:
The matplotlib
Figure.