Hi, anyone knows how to use bayesian optimization to get the minimum value of a blackbox function, I read the manual of BayesianOptimization.jl

https://github.com/jbrea/BayesianOptimization.jl

but it’s not easy to understand, and I don’t want to optimize the hyperparameters, I just have a function that can output a value once a group of parameters are input, and I want to use bayesian optimization to get the minimum value and the corresponding parameters. Can anyone give me an easy example, e.g. for` f=x^2+(y-2)^2`

, we know the minimum parameter is` x=0,y=2`

, I can use bayesopt function in matlab and get this parameter, but for Julia, I don’t know how to do it

Here is a example of Matlab

```
xrange = optimizableVariable('v1',[-2,2],'Type','real');
yrange = optimizableVariable('v2',[-5,5],'Type','real');
var=[xrange yrange];
bayesObject = bayesopt(@(tbl)mdlfun(tbl),var,...
'MaxObjectiveEvaluations',50); % iteration numbers
function rel = mdlfun(tbl)
x=tbl.v1;
y=tbl.v2;
rel=f(x,y);
end
function output=f(x,y)
output=x^2+(y-2)^2;
end
```

Can anyone help me to re-write it with Julia