Skip to content

Commit cc401c9

Browse files
committed
DOC no more need for compute_importances in trees
Prevents warning from doctest.
1 parent c481ff8 commit cc401c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/modules/feature_selection.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ features::
198198
>>> X, y = iris.data, iris.target
199199
>>> X.shape
200200
(150, 4)
201-
>>> clf = ExtraTreesClassifier(compute_importances=True, random_state=0)
201+
>>> clf = ExtraTreesClassifier(random_state=0)
202202
>>> X_new = clf.fit(X, y).transform(X)
203+
>>> clf.feature_importances_
204+
array([ 0.08062796, 0.03471289, 0.42329694, 0.46136221])
203205
>>> X_new.shape
204206
(150, 2)
205207

@@ -211,5 +213,3 @@ features::
211213

212214
* :ref:`example_ensemble_plot_forest_importances_faces.py`: example
213215
on face recognition data.
214-
215-

0 commit comments

Comments
 (0)