Skip to content

Commit bd60ea7

Browse files
authored
DOC Fix misleading statement about model refitting in permutation importance docs (scikit-learn#31596)
1 parent 651a4ae commit bd60ea7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/ensemble/plot_forest_importances.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@
102102
forest_importances = pd.Series(result.importances_mean, index=feature_names)
103103

104104
# %%
105-
# The computation for full permutation importance is more costly. Features are
106-
# shuffled n times and the model refitted to estimate the importance of it.
107-
# Please see :ref:`permutation_importance` for more details. We can now plot
108-
# the importance ranking.
105+
# The computation for full permutation importance is more costly. Each feature is
106+
# shuffled n times and the model is used to make predictions on the permuted data to see
107+
# the drop in performance. Please see :ref:`permutation_importance` for more details.
108+
# We can now plot the importance ranking.
109109

110110
fig, ax = plt.subplots()
111111
forest_importances.plot.bar(yerr=result.importances_std, ax=ax)

0 commit comments

Comments
 (0)