Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

BBO-LP - example #162

Open
theo20 opened this issue Feb 14, 2018 · 0 comments
Open

BBO-LP - example #162

theo20 opened this issue Feb 14, 2018 · 0 comments

Comments

@theo20
Copy link

theo20 commented Feb 14, 2018

Hello. I want to maximise my function goldstein, using batch mode and Local Penalisation. But I get an error. Could you please tell me why this might not working? I obtained the results but I am not sure if these are correct.

  1. I still don't know from where we get the optimal value at each iteration. If I specify my batch size =4, then at each iteratation I get four new points. From where I choose these 4 points?
  2. What is the optimisation restarts and what the acquisition_weight?

Here is the code that I am using and the error that I obtain.
Thank you in advance for your help.

#define my objective function
def goldstein(D):
....
myfun=lambda var: goldstein(var);

#domain
domain =[{'name': 'var_1', 'type': 'continuous', 'domain': (-2,2)},
{'name': 'var_2', 'type': 'continuous', 'domain': (-2,2)}]

#initial design
space = GPyOpt.Design_space(domain)
data_init = 10
X = initial_design('latin',space,data_init)

#Evaluate my function at X
Y = myfun(X)

#Batch Size & Iterations
batch_size = 4
max_iter = 10
num_cores = 4

#Optimisation using BBO-LP
myBopt = GPyOpt.methods.BayesianOptimization(f=goldstein, # function to optimize
domain=domain,
X=X,
Y=Y,
acquisition_type='EI',
exact_feval = True,
normalize_Y = True,
evaluator_type = 'local_penalization',
batch_size = batch_size,
num_cores = num_cores,
optimize_restarts = 10,
acquisition_weight = 2,
de_duplication = True)

myBopt.run_optimization(max_iter)

EOFError
Error in parallel computation. Fall back to single process!

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

No branches or pull requests

1 participant