Concepedia

Publication | Open Access

<tt>emcee</tt>: The MCMC Hammer

11.3K

Citations

20

References

2013

Year

TLDR

The paper introduces and describes a stable, well‑tested Python implementation of the affine‑invariant ensemble sampler for MCMC, detailing its algorithm and implementation. The implementation employs the affine‑invariant ensemble sampler, an MCMC algorithm that requires only one or two tuning parameters and can run on multiple CPU cores without extra effort. The open‑source emcee code, already used in astrophysics papers, achieves excellent performance with low autocorrelation time, needs only one or two tuning parameters, and can automatically exploit multiple CPU cores. The code is available online at http://dan.iel.fm/emcee under the GNU GPL v2 license.

Abstract

We introduce a stable, well tested Python implementation of the affine-invariant ensemble sampler for Markov chain Monte Carlo (MCMC) proposed by Goodman & Weare (2010). The code is open source and has already been used in several published projects in the astrophysics literature. The algorithm behind emcee has several advantages over traditional MCMC sampling methods and it has excellent performance as measured by the autocorrelation time (or function calls per independent sample). One major advantage of the algorithm is that it requires hand-tuning of only 1 or 2 parameters compared to ∼N2 for a traditional algorithm in an N-dimensional parameter space. In this document, we describe the algorithm and the details of our implementation. Exploiting the parallelism of the ensemble method, emcee permits any user to take advantage of multiple CPU cores without extra effort. The code is available online at http://dan.iel.fm/emcee under the GNU General Public License v2.

References

YearCitations

Page 1