rank_shap_feature_indices
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.
- rank_shap_feature_indices(shap_values: ndarray, *, top_k: int = 3) ndarray[source]
Rank features by mean absolute SHAP attribution (descending).
- Parameters:
shap_values – Attribution matrix
(n_samples, n_features).top_k – Number of leading indices to return.
- Returns:
Integer index array of length
min(top_k, n_features).