Skip to content
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

Closed
wants to merge 19 commits into from

Conversation

TolisChal
Copy link
Member

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.

@TolisChal
Copy link
Member Author

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.

Copy link
Collaborator

@papachristoumarios papachristoumarios left a 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!

@TolisChal
Copy link
Member Author

I'm closing this PR as it is covered by #216 and #279

@TolisChal TolisChal closed this Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants