vix.ing · top · new · best · stats

emcee: The MCMC Hammer

2012/02/29 by Daniel Foreman-Mackey, David W. Hogg, Dustin Lang +1 · 12,063 citations
Mathematics · Physics and Astronomy · #Autocorrelation #Bayesian probability #Code (set theory) #Galaxies: Formation, Evolution, Phenomena #Markov Chains and Monte Carlo Methods #Markov chain Monte Carlo #Monte Carlo method #Python (programming language) #Sampling (signal processing) #Source code #Statistical Mechanics and Entropy #astro-ph.IM #physics.comp-ph #stat.CO

paper · pdf · doi:10.1086/670067

published in Publications of the Astronomical Society of the Pacific 125(925), 306-312 (Institute of Physics) · Code re-licensed under MIT

openalex publication_date 2013/03/01 · arxiv created 2013/11/25 · arxiv updated 2013/11/26 · openalex created_date 2016/06/24 · openalex updated_date 2026/08/05

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 ∼ N 2 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.

Cited by

Related