Toggle Main Menu Toggle Search

Open Access padlockePrints

emcee v3: A Python ensemble sampling toolkit for affine-invariant MCMC

Lookup NU author(s): Dr Anne Archibald



This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).


emcee is a Python library implementing a class of affine-invariant ensemble samplers for Markov chain Monte Carlo (MCMC). This package has been widely applied to probabilistic modeling problems in astrophysics where it was originally published (Foreman-Mackey, Hogg, Lang, & Goodman, 2013), with some applications in other fields. When it was first released in 2012, the interface implemented in emcee was fundamentally different from the MCMC libraries that were popular at the time, such as PyMC, because it was specifically designed to work with “black box” models instead of structured graphical models. This has been a popular interface for applications in astrophysics because it is often non-trivial to implement realistic physics within the modeling frameworks required by other libraries. Since emcee’s release,other libraries have been developed with similar interfaces, such as dynesty (Speagle, 2019). The version 3.0 release of emcee is the first major release of the library in about 6 years and it includes a full re-write of the computational backend, several commonly requested features,and a set of new “move” implementations.

Publication metadata

Author(s): Foreman-Mackey D, Farr WM, Sinha M, Archibald AM, Hogg DW, Sanders JS, Zuntz J, Williams PKG, Nelson ARJ, deVal-Borro M, Erhardt T, Pashchenko I, Pla OA

Publication type: Article

Publication status: Published

Journal: Journal of Open Source Software

Year: 2019

Volume: 4

Issue: 43

Print publication date: 17/11/2019

Online publication date: 17/11/2019

Acceptance date: 17/11/2019

Date deposited: 28/11/2019

ISSN (electronic): 2475-9066

Publisher: Open Journals


DOI: 10.21105/joss.01864


Altmetrics provided by Altmetric


Find at Newcastle University icon    Link to this publication