Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bayesian Optimisation Tutorial

Tutorial page on how to use Bayesian Optimisation using BoTorch framework for the Bayesian Away day on the 15/07/2026 at University of Liverpool. The aim of these tutorials is to showcase the capabilities of existing libraries and guide the user over some simple steps on how to implement a solution themselves.

Tutorials

In the jupiter notebook tutorial_1 we present a simple optimisation problem using Gaussian processes and bayesian optimisation to identify the global minima of a distribution. The second notebook tutorial_2, instead, explores further multi-dimensional problems of optimisation, including introduction of constraints on parameters and multi-objective problems.

Further information

For further help we suggest using the tutorials and material present on BoTorch website and Ax which is the adaptive experimentation platform (testing and applying BoTorch at scale).

Install from source

To install and use the software in a clean environment you can create a virtual environment by doing:

python3 -m venv <name_of_venv>

Activate the venv

Unix
source <name_of_venv>/bin/activate
Windows
.\<name_of_venv>\Scripts\activate

Ensure that pip is up to date before installing dependencies:

python -m pip install --upgrade pip

Then you can install the latest version from the GitHub repository:

python -m pip install git+https://github.com/UoL-SignalProcessingGroup/Bay_opt_tutorial.git

Alternatively, if you are developing the project locally...

python -m pip install -e .[dev]

Quick check

To check that the project is installed propertly please run:

import torch
from botorch.test_functions.multi_objective import C2DTLZ2

# test torch is installed correctly  -> torch.size([100])
x = torch.linspace(0, 1, 100)
print(x.shape)

# test the botorch is installed
tkwargs = {
    "dtype": torch.double,
    "device": torch.device("cuda:3" if torch.cuda.is_available() else "cpu"),
}

d = 2
M = 1
problem = C2DTLZ2(dim=d, num_objectives=M, negate=True).to(**tkwargs)
print(problem)  # --> C2DTLZ2()

About

Tutorial page on how to use Bayesian Optimisation using BOTorch

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages