Comments (13)
I'm working on a project related to Bayesian optimization so I can write a BO example using Stheno if someone is interested.
from stheno.jl.
Hi,
thanks for pinging me.
BayesianOptimization.jl is indeed designed to work with different models.
Currently, a model of type MyModel
needs to implement the following functions
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.
PR's to include Shteno models (or any other kind of model) are highly welcome, of course.
Note that it is somewhat costly to fit a full GP everytime a new observation arrives,
which is why I wrote https://github.com/jbrea/ElasticPDMats.jl to update a GP with new observations.
from stheno.jl.
Hiya. Unfortunately I've yet to see Stheno.jl used to do this -- if you encounter one please do report back here about it.
from stheno.jl.
Hi. The following blog is very informative:
http://krasserm.github.io/2018/03/21/bayesian-optimization/
If you put together an example, I can help test it.
Not able to do it by myself since I am just migrating to Julia coding.
Thanks,
from stheno.jl.
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?
from stheno.jl.
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
from stheno.jl.
@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 ).
I downloaded but I it fail.
Thanks
from stheno.jl.
@caxelrud, what error do you get? I can run this notebook without any error. Did you add the packages Stheno, Plots, Optim, Distributions
?
from stheno.jl.
@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.
You can also send me the Julia file. Thanks.
from stheno.jl.
@caxelrud, maybe you should check IJulia doc to ensure that you can run minimal Julia 1.5 example in Jupyter notebook at least.
from stheno.jl.
@yiyuezhuo, I checked Jupyter Notebook and it allows me to create new notebook with Julia 1.5.0.
I will check more.
But, the message I get from Jupyter, when trying to execute the note, is the following:
Unreadable Notebook: C:\Users\inter\OneDrive_myWork\Research2020\BayesianOpt_2020\bayesian_optimization3.ipynb NotJSONError('Notebook does not appear to be JSON: '{\n "cells": [\n {\n "cell_type": "m...')
from stheno.jl.
@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.
from stheno.jl.
@yiyuezhuo, looks good now. I will test it. I will next apply to a much larger dimension problem. I will report my findings. Thanks!
from stheno.jl.
Related Issues (20)
- TagBot trigger issue HOT 28
- 0.7 Roadmap
- Docs
- Precompiling Error HOT 3
- restrict observations to a specific (sub-) process HOT 7
- Kernel vs GP composition HOT 6
- 1-Dimensional Euclidean Space example doesn't work HOT 11
- Translate sklearn to Julia request HOT 9
- Contribute to Wikipedia's Comparison of Gaussian process software HOT 1
- Simple linear algebra for CompositeGP construction HOT 2
- Stheno.jl + Turing.jl on Julia 1.7
- Stheno.jl + Flux.jl examples
- [QUESTION] Stheno or AbstractGPs.jl? HOT 6
- Tutorial crashes in optimization HOT 2
- Supplying a distance matrix HOT 2
- Can anyone provide an example of using Stheno for multi-input GP regression? HOT 7
- BlockArray pullback is inadequate HOT 2
- Working with arbitrary multivariate mean HOT 3
- "Getting started" example fails HOT 4
- Tests currently broken HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stheno.jl.