Conditions | 1 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 12 |
Ratio | 100 % |
Changes | 0 |
1 | from sklearn.datasets import load_breast_cancer |
||
11 | View Code Duplication | def model(para, X, y): |
|
|
|||
12 | rgf = RGFClassifier( |
||
13 | max_leaf=para["max_leaf"], |
||
14 | reg_depth=para["reg_depth"], |
||
15 | min_samples_leaf=para["min_samples_leaf"], |
||
16 | algorithm="RGF_Sib", |
||
17 | test_interval=100, |
||
18 | verbose=False, |
||
19 | ) |
||
20 | scores = cross_val_score(rgf, X, y, cv=3) |
||
21 | |||
22 | return scores.mean() |
||
23 | |||
35 |