计算机科学 > 软件工程
[提交于 2014年12月16日]
标题:Testing MCMC code
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:David Duvenaud[v1] 2014年12月16日 星期二 22:37:20 UTC