Conditions | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
11 | def find_best_hyperpara(features, scores): |
||
12 | N_best_features = 1 |
||
13 | |||
14 | scores = np.array(scores) |
||
15 | index_best_scores = list(scores.argsort()[-N_best_features:][::-1]) |
||
16 | |||
17 | best_score = scores[index_best_scores][0] |
||
18 | best_features = features.iloc[index_best_scores] |
||
19 | |||
20 | return best_features, best_score |
||
21 | |||
42 |