plot_permutation_importance
Plot the feature permutation importance of models. Calculating
permutations can be time-consuming, especially if n_repeats
is high. For this reason, the permutations are stored under the
permutations
attribute. If the plot is called again for the
same model with the same n_repeats
, it will use the stored
values, making the method considerably faster. The
feature_importance
attribute is updated with the extracted
importance ranking.
Parameters: |
models: str, sequence or None, optional (default=None)
show: int, optional (default=None)
n_repeats: int, optional (default=10)
title: str or None, optional (default=None)
figsize: tuple or None, optional (default=None)
filename: str or None, optional (default=None)
display: bool or None, optional (default=True) |
Returns: |
fig: matplotlib.figure.Figure Plot object. Only returned if display=None .
|
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X, y)
atom.run(["LR", "LDA"], metric="average_precision")
atom.lda.plot_permutation_importance(show=10, n_repeats=7)