@@ 44-69 (lines=26) @@ | ||
41 | The shrinking parameter of the simplex algorithm. |
|
42 | """ |
|
43 | ||
44 | def __init__( |
|
45 | self, |
|
46 | search_space: Dict[str, list], |
|
47 | initialize: Dict[ |
|
48 | Literal["grid", "vertices", "random", "warm_start"], int | List |
|
49 | ] = {"grid": 4, "random": 2, "vertices": 4}, |
|
50 | constraints: List[callable] = [], |
|
51 | random_state: int = None, |
|
52 | rand_rest_p: float = 0, |
|
53 | nth_process: int = None, |
|
54 | alpha: float = 1, |
|
55 | gamma: float = 2, |
|
56 | beta: float = 0.5, |
|
57 | sigma: float = 0.5, |
|
58 | ): |
|
59 | super().__init__( |
|
60 | search_space=search_space, |
|
61 | initialize=initialize, |
|
62 | constraints=constraints, |
|
63 | random_state=random_state, |
|
64 | rand_rest_p=rand_rest_p, |
|
65 | nth_process=nth_process, |
|
66 | alpha=alpha, |
|
67 | gamma=gamma, |
|
68 | beta=beta, |
|
69 | sigma=sigma, |
|
70 | ) |
|
71 |
@@ 40-61 (lines=22) @@ | ||
37 | The direction of the grid search. |
|
38 | """ |
|
39 | ||
40 | def __init__( |
|
41 | self, |
|
42 | search_space: Dict[str, list], |
|
43 | initialize: Dict[ |
|
44 | Literal["grid", "vertices", "random", "warm_start"], int | List |
|
45 | ] = {"grid": 4, "random": 2, "vertices": 4}, |
|
46 | constraints: List[callable] = [], |
|
47 | random_state: int = None, |
|
48 | rand_rest_p: float = 0, |
|
49 | nth_process: int = None, |
|
50 | step_size: int = 1, |
|
51 | direction: Literal["diagonal", "orthogonal"] = "diagonal", |
|
52 | ): |
|
53 | super().__init__( |
|
54 | search_space=search_space, |
|
55 | initialize=initialize, |
|
56 | constraints=constraints, |
|
57 | random_state=random_state, |
|
58 | rand_rest_p=rand_rest_p, |
|
59 | nth_process=nth_process, |
|
60 | step_size=step_size, |
|
61 | direction=direction, |
|
62 | ) |
|
63 |