Skip to content

Commit 6d604d1

Browse files
manrajgroverjnothman
authored andcommitted
[MRG] Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV (scikit-learn#8847)
* Randomized Search Example: Fix min_samples_split values for RandomizedSearchCV and GridSearchCV * Randomized Search Example: Change min_samples_split from 1.0 -> 2
1 parent 8717a15 commit 6d604d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/model_selection/randomized_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def report(results, n_top=3):
5454
# specify parameters and distributions to sample from
5555
param_dist = {"max_depth": [3, None],
5656
"max_features": sp_randint(1, 11),
57-
"min_samples_split": sp_randint(1, 11),
57+
"min_samples_split": sp_randint(2, 11),
5858
"min_samples_leaf": sp_randint(1, 11),
5959
"bootstrap": [True, False],
6060
"criterion": ["gini", "entropy"]}
@@ -73,7 +73,7 @@ def report(results, n_top=3):
7373
# use a full grid over all parameters
7474
param_grid = {"max_depth": [3, None],
7575
"max_features": [1, 3, 10],
76-
"min_samples_split": [1, 3, 10],
76+
"min_samples_split": [2, 3, 10],
7777
"min_samples_leaf": [1, 3, 10],
7878
"bootstrap": [True, False],
7979
"criterion": ["gini", "entropy"]}

0 commit comments

Comments
 (0)