Tutorial: Bayesian Optimization

version 1.0.0 (4.02 KB) by Karl Ezra Pilario
1D and 2D black-box Bayesian optimization demonstration with visualizations.


Updated 13 Jul 2022

View License

This code shows a visualization of each iteration in Bayesian Optimization. MATLAB's fitrgp is used to fit the Gaussian process surrogate model, then the next sample is chosen using the Expected Improvement acquisition function. An exploitation-exploration parameter can be changed in the code. The code contains both 1D and 2D "black-box" functions for optimization.
[1] Rasmussen and Williams (2006). "Gaussian Processes for Machine Learning," MIT Press.

Cite As

Karl Ezra Pilario (2022). Tutorial: Bayesian Optimization (https://www.mathworks.com/matlabcentral/fileexchange/114950-tutorial-bayesian-optimization), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!