Conditions | 3 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
18 | def __init__(self, *args, step_size=1, direction="diagonal", **kwargs): |
||
19 | super().__init__(*args, **kwargs) |
||
20 | |||
21 | self.step_size = step_size |
||
22 | self.direction = direction |
||
23 | |||
24 | if direction == "orthogonal": |
||
25 | self.grid_search_opt = OrthogonalGridSearchOptimizer( |
||
26 | *args, step_size=step_size, **kwargs |
||
27 | ) |
||
28 | elif direction == "diagonal": |
||
29 | self.grid_search_opt = DiagonalGridSearchOptimizer( |
||
30 | *args, step_size=step_size, **kwargs |
||
31 | ) |
||
32 | else: |
||
33 | msg = "" |
||
34 | raise Exception(msg) |
||
35 | |||
43 |