From 2c06b62fae0afe4bca0be10ac2f94fa5f5149f79 Mon Sep 17 00:00:00 2001 From: sply88 Date: Tue, 9 Nov 2021 22:35:14 +0100 Subject: [PATCH 1/2] accelerate plot_successive_halving_iterations.py example #21598 --- .../model_selection/plot_successive_halving_iterations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/model_selection/plot_successive_halving_iterations.py b/examples/model_selection/plot_successive_halving_iterations.py index f23d2023ec251..9eb42c7dce67b 100644 --- a/examples/model_selection/plot_successive_halving_iterations.py +++ b/examples/model_selection/plot_successive_halving_iterations.py @@ -27,13 +27,13 @@ rng = np.random.RandomState(0) -X, y = datasets.make_classification(n_samples=700, random_state=rng) +X, y = datasets.make_classification(n_samples=400, n_features=12, random_state=rng) -clf = RandomForestClassifier(n_estimators=20, random_state=rng) +clf = RandomForestClassifier(n_estimators=15, random_state=rng) param_dist = { "max_depth": [3, None], - "max_features": randint(1, 11), + "max_features": randint(1, 6), "min_samples_split": randint(2, 11), "bootstrap": [True, False], "criterion": ["gini", "entropy"], From db4d0558f66e589cb9894275392210606446d496 Mon Sep 17 00:00:00 2001 From: sply88 Date: Sun, 28 Nov 2021 11:36:10 +0100 Subject: [PATCH 2/2] n_estimators back to 20 --- examples/model_selection/plot_successive_halving_iterations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/model_selection/plot_successive_halving_iterations.py b/examples/model_selection/plot_successive_halving_iterations.py index 9eb42c7dce67b..bd2d5635e376e 100644 --- a/examples/model_selection/plot_successive_halving_iterations.py +++ b/examples/model_selection/plot_successive_halving_iterations.py @@ -29,7 +29,7 @@ X, y = datasets.make_classification(n_samples=400, n_features=12, random_state=rng) -clf = RandomForestClassifier(n_estimators=15, random_state=rng) +clf = RandomForestClassifier(n_estimators=20, random_state=rng) param_dist = { "max_depth": [3, None],