Conditions | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
25 | def test_direction_0(): |
||
26 | n_initialize = 1 |
||
27 | opt = GridSearchOptimizer( |
||
28 | search_space, initialize={"vertices": n_initialize}, direction="orthogonal" |
||
29 | ) |
||
30 | opt.search(parabola_function, n_iter=n_iter) |
||
31 | search_data = opt.search_data |
||
32 | |||
33 | print("\n search_data \n", search_data, "\n") |
||
34 | y_data_count = search_data["y"].value_counts().to_dict() |
||
35 | print("\n y_data_count \n", y_data_count, "\n") |
||
36 | |||
37 | assert y_data_count[-100] >= n_iter - n_initialize |
||
38 |