Open theo20 opened 7 years ago
Hi @theo20, this are the answers:
Hi @javiergonzalezh. Many thanks for your reply.
I am not sure if I need to create a new acquisition function. I am interested to optimise my function using the local penalisation type but at each iteration, I would like to know if I can specify a new dataset.
Let's say that my initial dataset contains 10 points and I want to run it for 10 iterations and set my batch size as 2. Then, in the evaluations file I end up with 30 iterations. From which dataset the algorithm choose the next 20 points? After the first iteration, can I set a new dataset of where I can get the new xt?
In terms of the error, I just used the example provided GPyOpt: parallel Bayesian optimization. In the report file says that the optimization is completed but while is running i get the error 'Error in parallel computation. Fall back to single process!'. Here is the code, same as in the link. Just to let you know I am running this using Canopy - Enthought.
import matplotlib.pyplot as plt import GPy import numpy as np import GPyOpt
from GPyOpt.methods import BayesianOptimization from GPyOpt.util.general import from numpy.random import seed from pylab import
objective_true = GPyOpt.objective_examples.experiments2d.branin() # true function objective_noisy = GPyOpt.objective_examples.experiments2d.branin(sd = 0.1) # noisy version bounds = objective_noisy.bounds
domain = [{'name': 'var_1', 'type': 'continuous', 'domain': bounds[0]}, ## use default bounds {'name': 'var_2', 'type': 'continuous', 'domain': bounds[1]}]
batch_size = 2 num_cores = 4
seed(123)
BO_demo_parallel = GPyOpt.methods.BayesianOptimization(f=objective_noisy.f,
domain = domain,
acquisition_type = 'EI',
normalize_Y = True,
initial_design_numdata = 2,
evaluator_type = 'local_penalization',
batch_size = batch_size,
num_cores = num_cores,
acquisition_jitter = 0)
max_iter = 10
BO_demo_parallel.run_optimization(max_iter)
Hi @javiergonzalezh.
How can I specify at each iteration a new dataset by creating a new acquisition function? I am not sure if I understand this. Thanks.
You can specify a new data set by passing an new X and Y to the model. This is not an standard practice so, if you do this, be sure that the copies of X and Y are also updated in the BayesOpt object.
I would like to run BBO-LP. First, I would like to have my initial design points e.g.
X = initial_design('latin',space,data_init) Y = myfunction(X)
Then, I use:
BO_demo_parallel = GPyOpt.methods.BayesianOptimization(f=myfunction, domain = domain, acquisition_type = 'EI', X=X, Y=Y, normalize_Y = True, initial_design_numdata = 2, evaluator_type = 'local_penalization', batch_size = batch_size, num_cores = num_cores, acquisition_jitter = 0)
Many thanks.