generalization #9

Merged
ajoubrel-ensae merged 19 commits from generalization into main 2024-03-20 21:26:04 +01:00
Showing only changes of commit ee86fcaf84 - Show all commits

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),