Skip to content

[GENERAL SUPPORT]: Getting best predicted point of a botorch model #2636

@RoeyYadgar

Description

@RoeyYadgar

Question

Hi,

I'm trying get the best predicted point (the point which minimizes the posterior mean instead of the best point observed so far) of a fitted model.
What I currently do is perform the optimization loop with the following GenerationStep:

GenerationStep(model=Models.GPEI,num_trials=-1)

And when i want to get the best predicted point I create a new model with PosteriorMean Acqusition class and generate a trial with it:

gp = Models.BOTORCH_MODULAR(experiment=exp,data=exp.fetch_data(),botorch_acqf_class=PosteriorMean,optimization_config = exp.optimization_config)
best_prediction = gp.gen(1)

This indeed works but it needs to re-fit the data again (even though I already fitted that same data in the optimization step), is there a better way to do this which doesn't require fitting the data again?

Thanks :)

Please provide any relevant code snippet if applicable.

No response

Code of Conduct

  • I agree to follow this Ax's Code of Conduct

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions