8000 DOC speed up plot_ensemble_oob.py (#21730) · scikit-learn/scikit-learn@e97d666 · GitHub
[go: up one dir, main page]

Skip to content

Commit e97d666

Browse files
siavrezglemaitre
authored andcommitted
DOC speed up plot_ensemble_oob.py (#21730)
* After 125, more estimators does not help the model and it improves runtime by almost 50% * accelerate plot_ensemble_oob.py changed max_estimator to 150 with step=5
1 parent acb9f00 commit e97d666

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/ensemble/plot_ensemble_oob.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@
8181

8282
# Range of `n_estimators` values to explore.
8383
min_estimators = 15
84-
max_estimators = 175
84+
max_estimators = 150
8585

8686
for label, clf in ensemble_clfs:
87-
for i in range(min_estimators, max_estimators + 1):
87+
for i in range(min_estimators, max_estimators + 1, 5):
8888
clf.set_params(n_estimators=i)
8989
clf.fit(X, y)
9090

0 commit comments

Comments
 (0)
0