Skip to content

Commit 34dbb45

Browse files
committed
Adjusted the parameters for gridsearch
1 parent e1cdae8 commit 34dbb45

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

decision_trees/utils/constants.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,32 +39,32 @@ def get_tuned_parameters(clf_type: ClassifierType) -> Dict:
3939

4040
if clf_type == ClassifierType.DECISION_TREE:
4141
tuned_parameters = {
42-
'max_depth': [10, 20, 50, 100], # [5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, None],
42+
'max_depth': [10, 20, 50, 100, None], # [5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, None],
4343
# 'splitter': ["best", "random"],
44-
'min_samples_split': [2, 10], # [2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20]
44+
'min_samples_split': [2, 5, 10], # [2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20]
4545
# 'min_samples_split': [0.001, 0.002, 0.003, 0.004, 0.005, 0.01, 0.02, 0.05]
4646
'random_state': [42]
4747
}
4848
elif clf_type == ClassifierType.RANDOM_FOREST:
4949
tuned_parameters = {
5050
'max_depth': [10, 20, 50, 100, None],
5151
# criterion
52-
'n_estimators': [10, 20, 50, 100, 200],
52+
'n_estimators': [16, 32, 64, 128, 256],
5353
# 'max_features': ['sqrt', 'log2'],
5454
# 'min_samples_leaf': [1, 5, 10, 25, 50, 100, 125, 150, 175, 200],
55-
'min_samples_split': [2], # [2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 75, 100]
56-
'class_weight': [None], # , 'balanced'],
55+
'min_samples_split': [2, 5, 10], # [2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 75, 100]
56+
# 'class_weight': [None], # , 'balanced'],
5757
# 'n_jobs': [-1],
5858
'random_state': [42]
5959
}
6060
elif clf_type == ClassifierType.RANDOM_FOREST_REGRESSOR:
6161
tuned_parameters = {
6262
'max_depth': [10, 20, 50, 100, None],
6363
# criterion
64-
'n_estimators': [10, 20, 50, 100, 200],
64+
'n_estimators': [16, 32, 64, 128, 256],
6565
# 'max_features': ['sqrt', 'log2'],
6666
# 'min_samples_leaf': [1, 5, 10, 25, 50, 100, 125, 150, 175, 200],
67-
'min_samples_split': [2], # [2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 75, 100]
67+
'min_samples_split': [2, 5, 10], # [2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50, 75, 100]
6868
# 'n_jobs': [-1],
6969
'random_state': [42]
7070
}

0 commit comments

Comments
 (0)