Conditions | 1 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from sklearn.model_selection import cross_val_score |
||
10 | def model(para, X, y): |
||
11 | gbc = GradientBoostingClassifier( |
||
12 | n_estimators=para["n_estimators"], |
||
13 | max_depth=para["max_depth"], |
||
14 | min_samples_split=para["min_samples_split"], |
||
15 | ) |
||
16 | scores = cross_val_score(gbc, X, y, cv=3) |
||
17 | |||
18 | return scores.mean() |
||
19 | |||
50 |