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

Cannot use the batch_size>1 with local penalization evaluator #357

@blttkgl

Description

@blttkgl

Hey all,

According to the issues I read in this repository, the batch_size>1 only works with the local_penalization evaluator, and not with sequential or any other evaluator model.

I have set up a Bayesian Optimization model where I use a GP surrogate model m trained on my dataset as my objective function, as follows:

def obj_func(X):
    out,_ = m.predict(X)
    return(out)

bo_step = GPyOpt.methods.BayesianOptimization(f = obj_func, domain = bounds,
                                                    model_type='GP',normalize_Y = False,
                                                    evaluator_type = 'local_penalization',
                                                    acquisition_type='EI',batch_size=5, maximize=True, eps=1e-8)

when I run the optimization, I only get a single prediction instead of batch_size=5:

bo_step.run_optimization(max_iter=5)

If I use the external object evaluation example as a starting point and use bo_step.suggest_next_locations() functions, I get 5 suggestions, but it seems that it does not really maximize my objective function (below). However I am not sure if I can/should use this object since I already have a surrogate model function fit into my dataset.

x_next = bo_step.suggest_next_locations()

Any help or suggestion on this is highly appreciated.

Best,

Bulut

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions