/mixed_hmc

Primary LanguagePythonMIT LicenseMIT

Introduction

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. An alternative implementation is available within the probabilistic programming language NumPyro.

Setting up the environment

  1. Install miniconda (if not already installed)
  2. Set up the virtual environment
conda env create -f environment.yml
conda activate momentum
python setup.py develop
  1. Follow instructions on https://github.com/slinderman/pypolyagamma to manually install pypolyagamma inside the virtual environment

Reproducing the results

Use the scripts in the scripts folder to reproduce results in the paper.

Erratum

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.