BayesianOptimization icon indicating copy to clipboard operation
BayesianOptimization copied to clipboard

Acquisition function API redesign

Open till-m opened this issue 9 months ago • 8 comments

Redesign the way acquisition functions work.

Content:

  • Deletes the UtilityFunction class and replaces it with a generic AcquisitionFunction base class
  • Delete acq_max, let each acquisition function handle the maximization itself
  • Adds UpperConfidenceBound, ProbabilityOfImprovement and ExpectedImprovement as possible utility functions
  • Adds wrapper acquisition function GPHedge to find which of (a combination of) UCB/PoI/EI are best suited for a problem #439
  • ~Adds wrapper acquisition function KrigingBeliever to allow for async optimization #347 #365~
  • Adds wrapper acquisition function ConstantLiar to allow for async optimization #347 #365. Strategies are min, max, mean and constant (latter chosen by supplying a number).
  • Disallow constrained optimization for UCB -- the constrained optimization relies on the acquisition function being lower-bounded by zero, otherwise the rescaling doesn't make so much sense. While the old implementation seems to have worked sufficiently well, this is more principled.
  • ~Sets default unconstrained acquisition function to GPHedge with base functions UCB(kappa=2.576), PoI(xi=0.01), EI(xi=0.01).~ Sets default unconstrained acquisition function to UCB(kappa=2.576)
  • ~Set GPHedge with base functions PoI(xi=0.01), EI(xi=0.01) as standard acquisition function for constrained improvement~ Sets default constrained acquisition function to EI(xi=0.01)
  • Make the acquisition function a property of the optimizer (this should mean the the optimizer as a whole is serializable, including the acquisition function, though I haven't actually tested this). This change is breaking as it means suggest, maximize etc. don't take an acquisition function argument anymore.

Why? The old UtilityFunction and acq_max were the most inflexible part of this package and their design was somewhat convoluted (e.g. providing a xi parameter when using UCB). Now it should be much easier to add custom acquisition functions.

till-m avatar Oct 22 '23 10:10 till-m