|
2 | 2 |
|
3 | 3 | # copyright: hyperactive developers, MIT License (see LICENSE file) |
4 | 4 |
|
5 | | -import numpy as np |
6 | 5 | from hyperactive.base import BaseOptimizer |
7 | 6 | from skbase.utils.stdout_mute import StdoutMute |
8 | 7 |
|
@@ -129,13 +128,6 @@ def _run(self, experiment, **search_config): |
129 | 128 | n_iter = search_config.pop("n_iter", 100) |
130 | 129 | max_time = search_config.pop("max_time", None) |
131 | 130 |
|
132 | | - # convert hyper search-space into gfo search-space |
133 | | - search_space_hyper = search_config["search_space"] |
134 | | - search_space_gfo = {} |
135 | | - for key in search_space_hyper.keys(): |
136 | | - search_space_gfo[key] = np.array(range(len(search_space_hyper[key]))) |
137 | | - search_config["search_space"] = search_space_gfo |
138 | | - |
139 | 131 | gfo_cls = self._get_gfo_class() |
140 | 132 | hcopt = gfo_cls(**search_config) |
141 | 133 |
|
@@ -188,8 +180,8 @@ def get_test_params(cls, parameter_set="default"): |
188 | 180 | params_sklearn = { |
189 | 181 | "experiment": sklearn_exp, |
190 | 182 | "search_space": { |
191 | | - "C": [0.01, 0.1, 1, 10], |
192 | | - "gamma": [0.0001, 0.01, 0.1, 1, 10], |
| 183 | + "C": np.array([0.01, 0.1, 1, 10]), |
| 184 | + "gamma": np.array([0.0001, 0.01, 0.1, 1, 10]), |
193 | 185 | }, |
194 | 186 | "n_iter": 100, |
195 | 187 | } |
|
0 commit comments