Open
Description
In this issue the progress for the API-changes for v2 is shown.
The objective-function parameter might make more sense in the optimizer-class instead of the search
-method. Parameters in the method should be data you would want to change from one search to the next. It does not make sense to me to change the objective-function but not the search-space. So the new API-design would look like this:
import numpy as np
from gradient_free_optimizers import RandomSearchOptimizer
def parabola_function(para):
loss = para["x"] * para["x"]
return -loss
search_space = {"x": np.arange(-10, 10, 0.1)}
opt = RandomSearchOptimizer(parabola_function, search_space)
opt.search(n_iter=100000)