Papers › emcee: The MCMC Hammer

emcee: The MCMC Hammer

16 Feb 2012arXiv:1202.3665links table onlyarchive 2025-07-28

Daniel Foreman-Mackey, David W. Hogg, Dustin Lang, Jonathan Goodman

The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.

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² for a traditional algorithm in an N-dimensional parameter space. In this document, we describe the algorithm and the details of our implementation and API. 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 MIT License.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1202.3665")

Code

Syntology Ran 2 of 48 code samples harvested from 9 repositories linked to this paper; 46 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract.

By repository: official repository: 10 samples from 1 repository, 0 ran; community (archive-listed): 38 samples from 8 repositories, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

24 repositories listed; official and paper-mentioned ones first.

dfm/emcee officialmentioned in papermentioned on GitHubMIT report
abmantz/rgw mentioned on GitHubMIT report
aconley/mbb_emcee mentioned on GitHub report
aconley/pofd_affine mentioned on GitHubGPL-3.0 report
astromedia/mcmc-analysis mentioned on GitHubMIT report
c-matthews/usample mentioned on GitHubGPL-3.0 report
dfm/emcee3 mentioned on GitHubMIT report
eggplantbren/StretchR mentioned on GitHubGPL-3.0 report
hveerten/katu mentioned on GitHubLGPL-3.0 report
legolason/javelin-1 mentioned on GitHubGPL-2.0 report
mattpitkin/yamm mentioned on GitHubMIT report
mcfit/emcee mentioned on GitHubMIT report
mindriot101/rust-emcee mentioned on GitHubMIT report
nye17/javelin mentioned on GitHubGPL-2.0 report
prayush/nsbh_tidal mentioned on GitHub report
rscalzo/pyBoloSN mentioned on GitHubMIT report
s-ilic/ECLAIR mentioned on GitHubMIT report
utkarshgiri/jaims mentioned on GitHubjaxMIT report
viveikjha/javelin_code mentioned on GitHubGPL-2.0 report
wgurecky/bipymc mentioned on GitHubNOASSERTION report
willvousden/ptemcee mentioned on GitHub report
zoghbi-a/xspec_emcee mentioned on GitHubMIT report
gitlab.com/Noxbru/Katu mentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

48 samples harvested; 2 ran; 1 honoured the contract we drafted; 46 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
46unverified

Licence: 3 of the 48 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 9 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

auto_window dfm/emcee/src/emcee/autocorr.py official repository unverified MIT (permissive) · 5574559b8d4c0099 · report
deprecated dfm/emcee/src/emcee/utils.py official repository unverified MIT (permissive) · 87b482abfc07970e · report
function_1d dfm/emcee/src/emcee/autocorr.py official repository unverified MIT (permissive) · 96aebcf0f6d20800 · report
get_progress_bar dfm/emcee/src/emcee/pbar.py official repository unverified MIT (permissive) · 36c67203d525ecfe · report
ndarray_to_list_of_dicts dfm/emcee/src/emcee/ensemble.py official repository unverified MIT (permissive) · f69c32b0d60425d3 · report
next_pow_two dfm/emcee/src/emcee/autocorr.py official repository unverified MIT (permissive) · 3f0eeafa1475e678 · report
sample_ball dfm/emcee/src/emcee/utils.py official repository unverified MIT (permissive) · 4d5bb6b1f4a2b6ec · report
sample_ellipsoid dfm/emcee/src/emcee/utils.py official repository unverified MIT (permissive) · 6b0c6f7916ecccfe · report
walkers_independent dfm/emcee/src/emcee/ensemble.py official repository unverified MIT (permissive) · 19462bd6634e1504 · report
walkers_independent_cov dfm/emcee/src/emcee/ensemble.py official repository unverified MIT (permissive) · f53cf8bd70e2f5a2 · report
is_number s-ilic/ECLAIR/ECLAIR_tools.py community (archive-listed) ran · violated contract MIT (permissive) · e18607dae38b30e2 · report
make_ladder willvousden/ptemcee/ptemcee/sampler.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · 7fbbf8658219a198 · report
IAT s-ilic/ECLAIR/ECLAIR_plots.py community (archive-listed) unverified MIT (permissive) · 8573d37bba03679c · report
SC s-ilic/ECLAIR/ECLAIR_plots.py community (archive-listed) unverified MIT (permissive) · ab9e5bdaa767ed2f · report
SG s-ilic/ECLAIR/likelihoods/CMB/Planck/PR4/hillipop_EE/tools.py community (archive-listed) unverified MIT (permissive) · 7ffc9e2d1e4092d9 · report
SNMCMC_EBMV rscalzo/pyBoloSN/SNMCMC/SNMCMC_EBMV.py community (archive-listed) unverified MIT (permissive) · b1a6537510358554 · report
SQ s-ilic/ECLAIR/ECLAIR_plots.py community (archive-listed) unverified MIT (permissive) · edf74ef28a8bc1ac · report
append_outlier_dist_info astromedia/mcmc-analysis/utilities_mcmc_analysis.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 70b45fa4c782090f · report
convert_to_stdev s-ilic/ECLAIR/likelihoods/CMB/Planck/PR4/hillipop_EE/tools.py community (archive-listed) unverified MIT (permissive) · 9982aa84edbe1110 · report
default_beta_ladder mcfit/emcee/emcee/ptsampler.py community (archive-listed) unverified MIT (permissive) · 42abc12a6b99da3d · report
default_grad_log_prior_function dfm/emcee3/emcee3/model.py community (archive-listed) unverified MIT (permissive) · e76836fad9dcb79e · report
default_log_prior_function dfm/emcee3/emcee3/model.py community (archive-listed) unverified MIT (permissive) · f68e52fd7f0ce48a · report
find_outlier_dist_guess astromedia/mcmc-analysis/utilities_mcmc_analysis.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · f81791452b1316be · report
find_outlier_dist_priors astromedia/mcmc-analysis/utilities_mcmc_analysis.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 3cef807763c3b110 · report
function dfm/emcee3/emcee3/autocorr.py community (archive-listed) unverified MIT (permissive) · 4cd7e818c2722e55 · report
initialize_random_walkers utkarshgiri/jaims/jaims/helpers.py community (archive-listed) unverified MIT (permissive) · 9cac3d8648b0ea7a · report
integrated_time dfm/emcee3/emcee3/autocorr.py community (archive-listed) unverified MIT (permissive) · cd91b69a4f3e3775 · report
integrated_time mcfit/emcee/emcee/autocorr.py community (archive-listed) unverified MIT (permissive) · 6449332d84bd4e37 · report
is_arrval s-ilic/ECLAIR/ECLAIR_tools.py community (archive-listed) unverified MIT (permissive) · 2a014fde8fdb2246 · report
is_model dfm/emcee3/emcee3/model.py community (archive-listed) unverified MIT (permissive) · 83e0386a01c5a548 · report
krueger12_eta rscalzo/pyBoloSN/SNPhysics/Priors.py community (archive-listed) unverified MIT (permissive) · 6488f0ccc4df9c0a · report
lnlike mindriot101/rust-emcee/python-tests/fitting_a_model_to_data.py community (archive-listed) unverified MIT (permissive) · 5884b56c343520ed · report
lnlike mindriot101/rust-emcee/python-tests/basic.py community (archive-listed) unverified MIT (permissive) · 3f80edeb0c18032f · report
lnprior mindriot101/rust-emcee/python-tests/fitting_a_model_to_data.py community (archive-listed) unverified MIT (permissive) · 69d5fff3c0e4a5c2 · report
lnprior mindriot101/rust-emcee/python-tests/basic.py community (archive-listed) unverified MIT (permissive) · 458de16e22e2fba8 · report
lnprob mindriot101/rust-emcee/python-tests/fitting_a_model_to_data.py community (archive-listed) unverified MIT (permissive) · 025078eef0025a86 · report
lnprob mindriot101/rust-emcee/python-tests/basic.py community (archive-listed) unverified MIT (permissive) · 2ef998ba72abb670 · report
lnprob_gaussian mcfit/emcee/emcee/tests.py community (archive-listed) unverified MIT (permissive) · e5ab97b69f3ee299 · report
lnprob_gaussian_nan mcfit/emcee/emcee/tests.py community (archive-listed) unverified MIT (permissive) · 41bf464c262d6d85 · report
log_unit_sphere_volume mcfit/emcee/emcee/tests.py community (archive-listed) unverified MIT (permissive) · 7908b07eda2604b1 · report
mi09_Enuc rscalzo/pyBoloSN/SNPhysics/Priors.py community (archive-listed) unverified MIT (permissive) · 0ea41cd1d9c962a6 · report
rho_exp rscalzo/pyBoloSN/run_J99_qint.py community (archive-listed) unverified MIT (permissive) · a3a6c2d96465ec4c · report
rho_pow3x3 rscalzo/pyBoloSN/run_J99_qint.py community (archive-listed) unverified MIT (permissive) · 54cbebc123331570 · report
rho_pow7 rscalzo/pyBoloSN/run_J99_qint.py community (archive-listed) unverified MIT (permissive) · e9d5fe648035b99e · report
sample_ball mcfit/emcee/emcee/utils.py community (archive-listed) unverified MIT (permissive) · b5e99a69e04794a1 · report
sample_ellipsoid mcfit/emcee/emcee/utils.py community (archive-listed) unverified MIT (permissive) · 9144989af6b02a26 · report
splt s-ilic/ECLAIR/ECLAIR_tools.py community (archive-listed) unverified MIT (permissive) · edd64bf4e6addaa8 · report
yl05_bind rscalzo/pyBoloSN/SNPhysics/Priors.py community (archive-listed) unverified MIT (permissive) · d23887d53edd1531 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections