-
Notifications
You must be signed in to change notification settings - Fork 116
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
Reflective Hamiltonian Monte Carlo with Leafrog steps for exponential sampling #143
Conversation
Comment: This PR is redundant since the Hamiltonian Monte Carlo with Leapfrog integrator is implemented in #138 . This PR shall be updated when the previous PR is merged into develop. |
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 contents of this PR can be inferred from #138 .
More specifically, you could use the IsotropicLinearFunctor
class from include/ode_solvers/oracle_functors.hpp
to do exponential sampling.
For the R interface:
What can be a good addition, is creating the functor in R and giving it as an argument (rather than parsing functions from Rcpp which is rather slow; especially if you need a "famous" density) which would yield a considerable speedup.
Thank you in advance!
This PR implements the Reflective Hamiltonian Monte Carlo with leapfrog integrator to sample from the exponential distribution restricted to a convex polytope.
Algorithmic details:
-- We exploit the simple form of the gradient to reduce the cost per step.
-- When the trajectory hits the boundary it is reflected.
Implementation details:
-- The sampler is implemented by a new structure.
-- The PR extends the C++ interface for exponential sampling.
-- The sampler is integrated into the R interface of volesti.
-- This implementation is more stable than the case of exact HMC for exp. sampling, when the variance is extremely small.