plot_permutation_importance

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_permutation_importance(feature_names: Sequence[str], importance_mean: ndarray, *, importance_std: ndarray | None = None, title: str = 'Permutation Importance', top_k: int = 20)[source]

Horizontal bar chart of permutation importances (pure; no filesystem).

Parameters:
  • feature_names – Feature labels aligned with the importance vectors.

  • importance_mean – Mean importance per feature.

  • importance_std – Optional standard deviation for error bars.

  • title – Figure title (sanitised).

  • top_k – Maximum number of features to display.

Returns:

The matplotlib Figure.