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.7.tar.gz (95.4 kB view details)

Uploaded Source

Built Distribution

laplace_bayesopt-0.1.7-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file laplace_bayesopt-0.1.7.tar.gz.

File metadata

  • Download URL: laplace_bayesopt-0.1.7.tar.gz
  • Upload date:
  • Size: 95.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.18.1 CPython/3.9.19 Darwin/24.1.0

File hashes

Hashes for laplace_bayesopt-0.1.7.tar.gz
Algorithm Hash digest
SHA256 8b8ed5510f6a1d9a0cd78e7bc66326f2794a3e505feef18fee7074940ba816ee
MD5 2890d25b48e3e686e053e2ee09aee3dd
BLAKE2b-256 7e4cc7561e7e0367a735a140dc4d6e59c8fb773713bc94cac8470360e7c54154

See more details on using hashes here.

File details

Details for the file laplace_bayesopt-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for laplace_bayesopt-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 73886f024e35a97313e39f78370cc21b3a63461aafe1e1f4f81ff5cf4eda239e
MD5 57840e88d675ec3cdfd366dc0b4f3fe8
BLAKE2b-256 63e56908b136f75654cc5a32797025ce3cd84d2e14895cec9ae635404e40f202

See more details on using hashes here.

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