-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from JakobRobnik/deprecation
Deprecation
- Loading branch information
Showing
1 changed file
with
10 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,25 @@ | ||
# MicroCanonical Hamiltonian Monte Carlo (MCHMC) | ||
# Microcanonical Hamiltonian Monte Carlo (MCHMC) | ||
|
||
## Installation | ||
For details, please refer to https://microcanonical-monte-carlo.netlify.app/. | ||
|
||
`pip install mclmc` | ||
|
||
## Overview | ||
|
||
![poster](img/github_poster.png) | ||
## Usage | ||
|
||
This repository is currently deprecated, in favor of the implementation in Blackjax: https://blackjax-devs.github.io/sampling-book/algorithms/mclmc.html. | ||
|
||
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 | ||
A Julia implementation is also available [here](https://github.com/JaimeRZP/MicroCanonicalHMC.jl). | ||
|
||
Julia implementation is available [here](https://github.com/JaimeRZP/MicroCanonicalHMC.jl). | ||
|
||
The associated papers are: | ||
- [method and benchmark tests](https://arxiv.org/abs/2212.08549) | ||
- [formulation as a stochastic process and first application to the lattice field theory](https://arxiv.org/abs/2303.18221) | ||
## Overview | ||
|
||
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 . | ||
![poster](img/github_poster.png) | ||
|
||
## 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. | ||
|
||
|
||
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 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) |