emcee: The MCMC Hammer
By Daniel Foreman-Mackey, David W. Hogg, Dustin Lang, Jonathan B. Goodman. 2012
10,027 citations recorded by the source corpus.
We introduce a stable, well tested Python implementation of the affine-invariant ensemble sampler for Markov chain Monte Carlo (MCMC) proposed by Goodman & Weare (). 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.
Subfields: Astronomy and Astrophysics, Statistical and Nonlinear Physics, Statistics and Probability, Probabilistic & Bayesian Methods
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Astronomy and Astrophysics
- L. Hernquist
- P. Hopkins
- Volker Springel
- C. Conroy
- Simon D. M. White
- R. Dav'e
- R. Somerville
- P. V. van Dokkum
In Statistical and Nonlinear Physics
- Timothy Morton
- C. Conroy
- D. Charbonneau
- Jon Fortney
- N. Madhusudhan
- J. Owen
- Eugene O. Vasiliev
- C. Mordasini
In Statistics and Probability
- Justin Alsing
- Benjamin Dan Wandelt
- Timothy Morton
- Bernhard Schölkopf
- Frank Hutter
- Eugene O. Vasiliev
- J. Johnson
- N. Evans II
In Probabilistic & Bayesian Methods
- Frank Hutter
- Aaron Klein
- Stefan Falkner
- Justin Alsing
- Simon Bartels
- Philipp Hennig
- Timothy Morton
- Benjamin Dan Wandelt
Citations in the corpus
- Fast Bayesian Optimization of Machine Learning Hyperparameters on Large Datasets (2016, methodology): “As it has become standard in Bayesian optimization [5], we use Markov-Chain Monte Carlo (MCMC) integration to marginalize over the GPs hyperparameters (we use the emcee package [28]).”
- A SYSTEMATIC SEARCH FOR TRANSITING PLANETS IN THE K2 DATA (2015, methodology): “To do this fit, we use Markov Chain Monte Carlo (MCMC; Foreman-Mackey et al. 2013) to sample from the posterior probability for the stellar and planetary parameters taking limb darkening and integration time into account.”
- ZODIACAL EXOPLANETS IN TIME (ZEIT). III. A SHORT-PERIOD PLANET ORBITING A PRE-MAIN-SEQUENCE STAR IN THE UPPER SCORPIUS OB ASSOCIATION (2016, neutral): “…Spextool (Cushing et al. 2004), xtellcor (Vacca et al. 2003), IGRINS pipeline (Lee 2015), ARCoIRIS Spextool, batman (Kreidberg 2015), emcee (Foreman-Mackey et al. 2013) REFERENCES Ahn, C. P., Alexandroff, R., Allende Prieto, C., et al. 2012, ApJS, 203, 21 Aigrain, S., Hodgkin, S., Irwin,…”
- CHARACTERIZING THE COOL KOIs. VII. REFINED PHYSICAL PROPERTIES OF THE TRANSITING BROWN DWARF LHS 6343 C (2014, methodology): “10 https://github.com/sczesla/PyAstronomy We used emcee, an affine-invariant ensemble sampler described by Goodman & Weare (2010) and implemented by Foreman-Mackey et al. (2013), to maximize the likelihood function L= 0.5 [∑ i ( RVmodel, i − RVobserved, i σRV,i )2 + ∑ i ( fmodel SC, i − fobserved…”
- The completed SDSS-IV extended Baryon Oscillation Spectroscopic Survey: BAO and RSD measurements from the anisotropic power spectrum of the quasar sample between redshift 0.8 and 2.2 (2020, background): “16 to produce Monte Carlo Markov Chains with the emcee package (Foreman-Mackey et al. 2013).”
- DETECTION OF H2O AND EVIDENCE FOR TiO/VO IN AN ULTRA-HOT EXOPLANET ATMOSPHERE (2016, methodology): “…optimization, as implemented by the fmin routine of the scipy.optimize Python software package.10 The likelihood distribution was then marginalized using affineinvariant Markov chain Monte Carlo (MCMC), as imple- 10 http://scipy.org mented by the emcee software package (Foreman-Mackey et al. 2013).”
- Cloud-scale Molecular Gas Properties in 15 Nearby Galaxies (2018, methodology): “To take both the selection effect and the measurement uncertainties into account, we find the best-fit model parameters and their associated uncertainties using a Markov Chain Monte Carlo (MCMC) method (as implemented in emcee by Foreman-Mackey et al. 2013).”
- Red Clump Stars from LAMOST II: the outer disc of the Milky Way (2017, methodology): “Therefore, 1 We use the emcee package (Foreman-Mackey et al. 2013) to run the Markov chain Monte Carlo simulation. we divide the scale height model of López-Corredoira et al. (2002) by 2 so that they can be compared with our result.”
- A Multi-telescope Campaign on FRB 121102: Implications for the FRB Population (2017, methodology): “We used the Goodman and Weare affine invariant sampler (Goodman & Weare 2010) as implemented in emcee (Foreman-Mackey et al. 2013).”
- CONSTRAINING THE MILKY WAY'S HOT GAS HALO WITH O vii AND O viii EMISSION LINES (2014, methodology): “We utilize the Markov Chain Monte Marlo (MCMC) package emcee (Foreman-Mackey et al. 2013) to explore our model parameter space (note we assume uniform prior distributions for all MCMC runs unless otherwise noted).”
- Dearth of short-period Neptunian exoplanets - a desert in period-mass and period-radius planes (2016, background): “2, {(Pi,Mi); i = 1, N}, by L = N ∏ i=1 FPDF(Pi,Mi; a, b, δ,∆) , (8) and ran an MCMC routine with 250 walkers and 106 steps (e.g., Foreman-Mackey et al. 2013) to find the parameter values that maximized the sample likelihood and their uncertainties.”