BEEBO documentation

BEEBO is a family of acquisition functions for Bayesian optimization that natively scale to batched acquisition and trade off exploration and exploitation explicitly. The beebo package is compatible with BoTorch.

Installation

To install BEEBO, you can use pip:

pip install beebo

Usage

Both meanBEEBO and maxBEEBO are implemented as the BatchedEnergyEntropyBO class.

To use BatchedEnergyEntropyBO, you need to follow these steps:

  1. Import the class:

    from beebo import BatchedEnergyEntropyBO
    
  2. Create an instance of BatchedEnergyEntropyBO:

     # you need to set up a GP model first. Nothing special here - just a standard BoTorch setup.
    
    amplitude = model.covar_module.outputscale.item() # get the GP's kernel amplitude
    
    beebo = BatchedEnergyEntropyBO(
     model, # a gaussian process model.
     temperature=1.0,
     kernel_amplitude=amplitude, # used for scaling the temperature.
     energy_function='sum', # "sum" for meanBEEBO, "softmax" for maxBEEBO
     logdet_method='svd', # LinAlg: how to compute log determinants
     augment_method='naive', # LinAlg: how to perform the train data augmentation
     )
    
  3. Use BoTorch to optimize the acquisition function. Standard BoTorch parameters need to be set.

    from botorch.optim.optimize import optimize_acqf
    
    points, value = optimize_acqf(
     acq_fn,
     q=100, # the batch size
     bounds=bounds, # the bounds of the optimization problem
     # botorch hyperparameters for optimization
     num_restarts=10,
     raw_samples=100,
     )