Skip to content

wiseodd/laplace-bayesopt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bayesian Optimization Interface for laplace-torch

Installation

Install PyTorch first, then:

pip install git+https://git@github.com/aleximmer/laplace
pip install git+https://git@github.com/wiseodd/laplace-bayesopt

Usage

Basic usage

from laplace_bayesopt.botorch import LaplaceBoTorch

def get_net():
    # Return a *freshly-initialized* PyTorch model
    return torch.nn.Sequential(
        ...
    )

# Initial X, Y pairs, e.g. obtained via random search
train_X, train_Y = ..., ...

model = LaplaceBoTorch(get_net, train_X, train_Y)

# Use this model in your existing BoTorch loop, e.g. to replace BoTorch's MultiTaskGP model.

The full arguments of LaplaceBoTorch can be found in the class documentation.

Check out a full BoTorch example in examples/botorch/experiments.py.

Useful References

Citation

@inproceedings{kristiadi2023promises,
  title={Promises and Pitfalls of the Linearized {L}aplace in {B}ayesian Optimization},
  author={Kristiadi, Agustinus and Immer, Alexander and Eschenhagen, Runa and Fortuin, Vincent},
  booktitle={AABI},
  year={2023}
}

About

Laplace approximated BNN surrogate for BoTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages