# emcee: The MCMC Hammer

**Authors:** Daniel Foreman-Mackey, David W. Hogg, Dustin Lang, Jonathan Goodman  
**arXiv:** [1202.3665](https://arxiv.org/abs/1202.3665)  
**Date:** 2012-02-16  
**Summary page:** https://www.summarizepaper.com/en/paper/1202.3665v4/

## Key points

- Authors introduced a robust Python implementation of the affine-invariant ensemble sampler for MCMC
- Emcee algorithm offers advantages over traditional MCMC sampling methods, such as exceptional performance in autocorrelation time and function calls per independent sample
- Minimal parameter tuning requirement with only 1 or 2 parameters needing adjustment compared to traditional algorithms requiring approximately N^2 parameters
- Detailed description of emcee algorithm provided, including implementation and API outline
- Emcee enables users to harness multiple CPU cores effortlessly through parallelism inherent in ensemble methods
- Code is freely accessible online under the MIT License at http://dan.iel.fm/emcee

## Summary

In their paper titled "emcee: The MCMC Hammer," authors Daniel Foreman-Mackey, David W. Hogg, Dustin Lang, and Jonathan Goodman introduce a robust Python implementation of the affine-invariant ensemble sampler for Markov chain Monte Carlo (MCMC) originally proposed by Goodman & Weare in 2010. This open-source code has been extensively tested and utilized in various published projects within the astrophysics community. The emcee algorithm offers several advantages over traditional MCMC sampling methods, demonstrating exceptional performance in terms of autocorrelation time and function calls per independent sample. One key benefit of this algorithm is its minimal parameter tuning requirement, with only 1 or 2 parameters needing adjustment compared to the approximately N^2 parameters typically required by traditional algorithms operating in an N-dimensional parameter space. The authors provide a detailed description of the emcee algorithm, outlining its implementation and application programming interface (API). Leveraging the parallelism inherent in ensemble methods, emcee enables users to effortlessly harness multiple CPU cores without additional complexity. The code is freely accessible online under the MIT License at http://dan.iel.fm/emcee. Overall, "emcee: The MCMC Hammer" presents a valuable contribution to the field of computational astrophysics by offering a stable and efficient MCMC sampling tool that simplifies parameter tuning and enhances overall performance for researchers working with complex parameter spaces.
