@@ 42-54 (lines=13) @@ | ||
39 | return scores.mean() |
|
40 | ||
41 | ||
42 | def model_gbc(opt): |
|
43 | gbc = GradientBoostingClassifier( |
|
44 | n_estimators=opt["n_estimators"], |
|
45 | learning_rate=opt["learning_rate"], |
|
46 | max_depth=opt["max_depth"], |
|
47 | min_samples_split=opt["min_samples_split"], |
|
48 | min_samples_leaf=opt["min_samples_leaf"], |
|
49 | subsample=opt["subsample"], |
|
50 | max_features=opt["max_features"], |
|
51 | ) |
|
52 | scores = cross_val_score(gbc, X, y, cv=3) |
|
53 | ||
54 | return scores.mean() |
|
55 | ||
56 | ||
57 | search_space_etc = { |
@@ 42-54 (lines=13) @@ | ||
39 | return scores.mean() |
|
40 | ||
41 | ||
42 | def model_gbc(opt): |
|
43 | gbc = GradientBoostingClassifier( |
|
44 | n_estimators=opt["n_estimators"], |
|
45 | learning_rate=opt["learning_rate"], |
|
46 | max_depth=opt["max_depth"], |
|
47 | min_samples_split=opt["min_samples_split"], |
|
48 | min_samples_leaf=opt["min_samples_leaf"], |
|
49 | subsample=opt["subsample"], |
|
50 | max_features=opt["max_features"], |
|
51 | ) |
|
52 | scores = cross_val_score(gbc, X, y, cv=3) |
|
53 | ||
54 | return scores.mean() |
|
55 | ||
56 | ||
57 | search_space_etc = { |