reduce random forest param grid
This commit is contained in:
parent
9e5e364aa3
commit
ee86fcaf84
11
utils_ml.py
11
utils_ml.py
|
@ -281,12 +281,11 @@ def pipeline_randomF_benchmark(X_train, y_train, X_test, y_test, model_result):
|
||||||
def pipeline_randomF_cv(X_train, y_train, X_test, y_test, model_result):
|
def pipeline_randomF_cv(X_train, y_train, X_test, y_test, model_result):
|
||||||
y_train = y_train['y_has_purchased']
|
y_train = y_train['y_has_purchased']
|
||||||
param_grid = {
|
param_grid = {
|
||||||
'randomF_cv__n_estimators': [100, 200, 300],
|
'randomF_cv__n_estimators': [100, 300],
|
||||||
'randomF_cv__max_features': ['sqrt', 'log2', None],
|
'randomF_cv__max_features': ['sqrt', 'log2'],
|
||||||
'randomF_cv__min_samples_split': [2, 5, 10],
|
'randomF_cv__min_samples_split': [2, 10],
|
||||||
'randomF_cv__min_samples_leaf': [1, 2, 4],
|
'randomF_cv__min_samples_leaf': [1, 4],
|
||||||
'randomF_cv__bootstrap': [True, False],
|
'randomF_cv__class_weight': [weight_dict]
|
||||||
'randomF_cv__class_weight': [None, weight_dict]
|
|
||||||
}
|
}
|
||||||
pipeline = Pipeline(steps=[
|
pipeline = Pipeline(steps=[
|
||||||
('preprocessor', preproc),
|
('preprocessor', preproc),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user