Skip to content

Commit

Permalink
DOC speed up plot_ensemble_oob.py (#21730)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
siavrez committed Nov 24, 2021
1 parent 6a693ac commit c9e5067
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ensemble/plot_ensemble_oob.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@

# Range of `n_estimators` values to explore.
min_estimators = 15
max_estimators = 175
max_estimators = 150

for label, clf in ensemble_clfs:
for i in range(min_estimators, max_estimators + 1):
for i in range(min_estimators, max_estimators + 1, 5):
clf.set_params(n_estimators=i)
clf.fit(X, y)

Expand Down

0 comments on commit c9e5067

Please sign in to comment.