Graph explorer

Testing MCMC code

Markov Chain Monte Carlo (MCMC) algorithms are a workhorse of probabilistic modeling and inference, but are difficult to debug, and are prone to silent failure if implemented naively. We outline several strategies for testing the correctness of MCMC algorithms. Specifically, we advocate writing code in a modular way, where conditional probability calculations are kept separate from the logic of the sampler. We discuss strategies for both unit testing and integration testing. As a running example, we show how a Python implementation of Gibbs sampling for a mixture of Gaussians model can be tested.

5 nodes5 linksoverview mapTesting MCMC code
5 nodes5 links
Testing MCMC code5 visible / 5 total nodes / 6 links
Related contextCo-authorshipAuthorshipAuthorshipTopic signalTopic signalWTesting MCMC codepreprint / 2014ARoger B. GrosseResearcherADavid K. DuvenaudResearcherTMachine Learning49008 worksTSoftware Engineering3620 works
PaperSignal 104 links

Testing MCMC code

preprint / 2014

Open