automl / RoBO

RoBO: a Robust Bayesian Optimization framework
BSD 3-Clause "New" or "Revised" License
482 stars 133 forks source link

questions about MTBO objective function #115

Closed zhaojingyao closed 4 years ago

zhaojingyao commented 4 years ago

def objective(x, task): if task == 0: y = 0.5 np.sin(3 x[0]) 4 (x[0] - 1) (x[0] + 2) + 0.5 np.sin(3 x[1]) 4 (x[1] - 1) (x[1] + 2) elif task == 1: y = np.sin(3 x[0]) 4 (x[0] - 1) (x[0] + 2) + np.sin(3 x[1]) 4 (x[1] - 1) (x[1] + 2) return y,y

lower = np.zeros(2) upper = np.ones(2) * 6

results = mtbo(objective_function=objective, lower=lower, upper=upper, n_init=50, num_iterations=num_iterations, n_hypers=n_hypers, rng=rng, output_path=output_path)

When I run this code, it tells me that "ValueError: array must not contain infs or NaNs". Is there a problem with my definition of objective?