Open Paalon opened 6 years ago
I can't use constraints. Environment: Python 3.6.4 GPyOpt 1.2.1
import GPyOpt def objective(x): return (x[:,0]-0.1)**2 domain = [{'name': 'var_1', 'type': 'continuous', 'domain': (-1, 1)}] constraints = [{'name': 'const_1', 'constraint': 'x[:,0]'}] bo = GPyOpt.methods.BayesianOptimization(f=objective, domain=domain, constraints=constraints) bo.run_optimization(max_iter=15) bo.plot_acquisition()
I find that using constrain works (not constraint) as in constraints = [{'name': 'const_1', 'constrain': 'x[:,0]'}]
constrain
constraint
constraints = [{'name': 'const_1', 'constrain': 'x[:,0]'}]
I can't use constraints. Environment: Python 3.6.4 GPyOpt 1.2.1