-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bayesian Optimization Example #126
Comments
Hiya. Unfortunately I've yet to see Stheno.jl used to do this -- if you encounter one please do report back here about it. |
Hi. The following blog is very informative: |
I'm working on a project related to Bayesian optimization so I can write a BO example using Stheno if someone is interested. |
It would be great if someone could do some design work to specify an interface that a probabilistic model should satisfy to be compatible with Bayes Opt, and then implement Bayes Opt in terms of that interface. Then you could just hook whatever model you fancy into it. For example, it looks like BayesianOptimization.jl goes some way towards this, but I can't tell from the package exactly what's going on. I wonder if the author @jbrea has anything to say on the matter? |
Hi, thanks for pinging me. BayesianOptimization.jl is indeed designed to work with different models. m, v = mean_var(m::MyModel, x::AbstractVector) # return scalar mean and variance of the model at x
m, v = mean_var(m::MyModel, x::AbstractMatrix) # return size(x,2)-dimensional vector of means and variances of the model at x
update!(m::MyModel, x, y) # update the model with new inputs x and observations y
y = maxy(m::MyModel) # return the largest observed value used to fit the model
nx, nsamples = dims(m::MyModel) # return the dimensionalty nx of the input and the number of samples nsamples used so far to fit the model The code of BayesianOptimization.jl is a bit rusty. If there is interest, I can polish it a bit and document the API better. Note that it is somewhat costly to fit a full GP everytime a new observation arrives, |
I guess @caxelrud wants an example similar to his link instead of a full function interface? Anyway this is a gist replicating the result of referenced link: https://gist.github.com/yiyuezhuo/12e2dc828ac358f58e60ebd41b28f768 |
@yiyuezhuo, I am getting an error when trying you open the notebook from the gist link from your comment ( https://gist.github.com/yiyuezhuo/12e2dc828ac358f58e60ebd41b28f768 ). |
@caxelrud, what error do you get? I can run this notebook without any error. Did you add the packages |
@yiyuezhuo, I am getting an error with the Jupyter notebook. It looks corrupted for some reason. It doesn't open at the link (keep spinning and fail). I got the same problem when downloading and trying to run the Jupyter notebook in my computer. |
@yiyuezhuo, I checked Jupyter Notebook and it allows me to create new notebook with Julia 1.5.0. |
@caxelrud, sorry it seems that GitHub always corrupts first updated file in gist right now for some reason, I update the gist again to fix this. |
@yiyuezhuo, looks good now. I will test it. I will next apply to a much larger dimension problem. I will report my findings. Thanks! |
Can you point me to an example, using Stheno, of Bayesian Optimization with an objective that considers exploration and exploitation?
The text was updated successfully, but these errors were encountered: