reduce random forest param grid

This commit is contained in:
Alexis REVELLE 2024-03-19 11:43:44 +00:00
parent 9e5e364aa3
commit ee86fcaf84

View File

@ -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):
y_train = y_train['y_has_purchased']
param_grid = {
'randomF_cv__n_estimators': [100, 200, 300],
'randomF_cv__max_features': ['sqrt', 'log2', None],
'randomF_cv__min_samples_split': [2, 5, 10],
'randomF_cv__min_samples_leaf': [1, 2, 4],
'randomF_cv__bootstrap': [True, False],
'randomF_cv__class_weight': [None, weight_dict]
'randomF_cv__n_estimators': [100, 300],
'randomF_cv__max_features': ['sqrt', 'log2'],
'randomF_cv__min_samples_split': [2, 10],
'randomF_cv__min_samples_leaf': [1, 4],
'randomF_cv__class_weight': [weight_dict]
}
pipeline = Pipeline(steps=[
('preprocessor', preproc),