-
Notifications
You must be signed in to change notification settings - Fork 54
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
Added the No-U-Turn sampler #132
base: advancedHMC
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great to see that it was relatively straight-forward to write an interface between GaussianProcesses.jl
and AdvancedHMC.jl
. I think many people (myself included) will find this useful. What I would suggest is that once the PR is complete, the interface should be moved to a separate mini-package. This enables this functionality without adding a large dependency to either package. Ideally, GaussianProcesses.jl
should be “inference-agnostic” while making it as easy as possible for users to use other packages (such as AdvancedHMC
or DynamicHMC
). The exception to this would be inference methods that are particular to Gaussian processes (such as slice sampling).
src/mcmc.jl
Outdated
""" | ||
function mcmc(gp::GPBase; nIter::Int=1000, burn::Int=1, thin::Int=1, ε::Float64=0.1, | ||
|
||
function effective_sample_size(X::AbstractMatrix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does compute_ess
need to be defined inside of effective_sample_size
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is indeed confusing. I'll change it.
Sorry for the slow response. I think this got lost in the pre-Christmas madness. Thanks, @Red-Portal for putting this together. From what I can tell the code is working and the tests pass. I think before we merge this it would be good to add a verbose flag, as you've mentioned. Given the amount of output per iteration, I'd set verbose=false as the default. Given that we now have a few inference methods, I think we should create an @maximerischard - you mentioned creating a separate inference package. I think this could be a good idea. In the short term, we could merge the |
@chris-nemeth I would think twice before adding the |
@maximerischard Yes, I'll remove the effective sample size calculation part as soon as I have some time. I'm currently in front of a deadline, so sorry for the delay. |
… into advancedHMC
….jl into advancedHMC
@maximerischard @chris-nemeth Hi! I've removed the ESS calculation related dependencies as promised. About introducing the |
…20-02-06-12-02-04-853-2561327094 CompatHelper: bump compat for "RecipesBase" to "0.8"
@maximerischard are you still thinking that a separate package for the inference methods is the best way forward? |
fixed bug in the elliptical slice implementation
Hi @Red-Portal, I was looking to integrate this PR and I did a quick check to see if it passes the tests. Could you please take a look at the deprecation error from |
@chris-nemeth Hi! |
I've been thinking about this some more over the weekend. I still think we should avoid having |
@maximerischard I'm not very familiar with you're suggesting. Can you elaborate? |
Added NUTS as
nuts
based on AdvancedHMC.In order to expose all of AdvancedHMC's options without exposing too much of
GaussianProcesses.jl
's internals, had to create a routine callednuts_hamiltonian
as a workaround.Please check if you are okay with
nuts_hamiltonian
's uglinesss.Also, added effective sample size diagnostics to every MCMC routines.
Since running all the diagnostics introduces a little bit of overhead,
adding a verbosity flag might be necessary?