Exact Hamiltonian Monte Carlo Sampler for Binary Distributions
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src_cpp
src_matlab
README.md
ising_1d_demo.m
mex_demo.m

README.md

hmc-binary

MATLAB and C++ implementations of the exact HMC sampler for binary distributions using a Gaussian augmentation. The algorithm was introduced in the NIPS 2013 paper "Auxiliary-variable exact Hamiltonian Monte Carlo samplers for binary distributions" by Ari Pakman and Liam Paninski.

Paper available at http://arxiv.org/abs/1311.2166

The script ising_1d_demo.m runs the MATLAB implementation and reproduces the 1D Ising model example in the paper.

The script mex_demo.m compiles and runs the C++ version for binary Markov Random Fields (Boltzmann machines). For other binary distributions, one can write a class derived from HMC_BinarySampler (similar to the MRF class).