Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

questions about MTBO objective function #115

Closed
zhaojingyao opened this issue Jun 4, 2020 · 0 comments
Closed

questions about MTBO objective function #115

zhaojingyao opened this issue Jun 4, 2020 · 0 comments

Comments

@zhaojingyao
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant