Bayesian Optimization Algorithm_ acquisition function

4 views (last 30 days)
Hi all,
I have a question regarding Bayesian Optimization Algorithm_ acquisition function (link is given below).
Acquisition function is meant only for maximisation problem,or i can use it for finding optimum minimum values for the parameters mentioned in Bayesian Optimization?
please clarify

Answers (1)

Akshat
Akshat on 26 Feb 2024
Hi NN,
From your question I gather that you want to know if you can find optimum minimum values for params mentioned in Bayesian Optimization.
There are two parts to my answer; the acquisition function gets maximised, to give an optimized answer to the function being optimised by Bayesian Optimization. That is the reason why in the documentation, the function you are inputting to optimize is "f(x)" and the acquisition function is "a(x)".
Now, you can use different acquisition functions to find optimum maximum/minimum values and their corresponding variable values in a range for the function you are trying to optimise using Bayesian Optimization.
For an example I have attached a script to minimise the Rosenbrock function, a very famous test problem for optimization algos. Note that, in the code you can replace the function I am optimising with anything you would like to optimise. I am just using an example so that you can see it is indeed possible to get the minimum values.
rosenbrockFunction = @(x) (1 - x.x1)^2 + 100 * (x.x2 - x.x1^2)^2;
% Just replace the above line with your function
% Define the optimization variables with their respective bounds.
optimVars = [
optimizableVariable('x1', [-5, 5]), ...
optimizableVariable('x2', [-5, 5])
];
% Run Bayesian optimization to minimize the objective function.
results = bayesopt(rosenbrockFunction, optimVars);
% Display the results.
bestPoint = results.XAtMinObjective;
minObjective = results.MinObjective;
fprintf('The minimum value of the objective function is %.4f found at x1 = %.4f and x2 = %.4f.\n', ...
minObjective, bestPoint.x1, bestPoint.x2);
Hope this helps!

Categories

Find more on Biotech and Pharmaceutical in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!