Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JakobRobnik/MicroCanonicalHMC
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobRobnik committed Dec 5, 2023
2 parents 11de870 + 7a49a8f commit 0f9badc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
You can check out the tutorials:
- [getting started](notebooks/tutorials/intro_tutorial.ipynb): sampling from a standard Gaussian
- [advanced tutorial](notebooks/tutorials/advanced_tutorial.ipynb): sampling the hierarchical Stochastic Volatility model for the S&P500 returns data
- [constraints](notebooks/tutorials/Constraints.ipynb)

Julia implementation is available [here](https://github.com/JaimeRZP/MicroCanonicalHMC.jl).

Expand All @@ -23,4 +22,19 @@ The associated papers are:
The code is still in active development, so let us know if you encounter any issues, including bad sampling performance, and we will do our best to help you out.
You can submit a github issue or contact us at jakob_robnik@berkeley.edu .

## Frequently asked questions:

### How can I sample with MCHMC if my parameters have bounds?
Check out [this tutorial](notebooks/tutorials/Constraints.ipynb).

### How does cost of producing one sample in HMC compare to the cost of one sample in MCHMC?
MCHMC samples are less costly. What is relevant for the computational time is the number of gradient evaluations used. Each sample in MCHMC is two gradient evaluations (1 gradient evaluation if leapfrog integrator is used instead of minimal norm integrator). Each sample in HMC is L gradient evaluations (where L is the number of leapfrog steps per sample), which can be quite large for hard targets (in default NUTS setting up to 1024).

### Is MCHMC just some weird projection of HMC onto the constant energy surface?
No, the Hamiltonian dynamics of both methods are different (the particles move differently). Below is the motion of MCHMC particles for the Rosenbrock target distribution.





![ensamble](img/rosenbrock.gif)

0 comments on commit 0f9badc

Please sign in to comment.