See Metropolis Augmented Hamiltonian Monte Carlo for a simplified and more general formulation of mixed HMC with Laplace momentum.
An alternative implementation of mixed HMC is available within the probabilistic programming language NumPyro.
This repo contains code for reproducing the results in the paper Mixed Hamiltonian Monte Carlo for Mixed Discrete and Continuous Variables at Neural Information Processing Systems (NeurIPS) 2020.
- Install miniconda (if not already installed)
- Set up the virtual environment
conda env create -f environment.yml
conda activate momentum
python setup.py develop
- Follow instructions on https://github.com/slinderman/pypolyagamma to manually install pypolyagamma inside the virtual environment
Use the scripts in the scripts
folder to reproduce results in the paper.
The version appeared at NeurIPS 2020 used an incorrect MH correction term, due to a mistake in the proof of a lemma in the supplementary. The arXiv version of the paper and the code in this repository have been fixed. See the erratum for more details.