Skip to main content

Bayesian optimization interface for the laplace-torch library

Project description

Bayesian Optimization Interface for laplace-torch

Installation

Install PyTorch first, then:

pip install --upgrade 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 SingleTaskGP model.

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

Check out examples in examples/.

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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

laplace_bayesopt-0.1.6.tar.gz (95.7 kB view hashes)

Uploaded Source

Built Distribution

laplace_bayesopt-0.1.6-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page