{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/efficient-sampling-of-fast-and-slow","title":"Efficient sampling of fast and slow cosmological parameters","arxiv_id":"1304.4473","date":"2013-04-16","proceeding":null,"authors":["Antony Lewis"],"abstract":"Physical parameters are often constrained from the data likelihoods using sampling methods. Changing some parameters can be much more computationally expensive (`slow') than changing other parameters (`fast parameters'). I describe a method for decorrelating fast and slow parameters so that parameter sampling in the full space becomes almost as efficient as sampling in the slow subspace when the covariance is well known and the distributions are simple. This gives a large reduction in computational cost when there are many fast parameters. The method can also be combined with a fast 'dragging' method proposed by Neal (2005) that can be more robust and efficient when parameters cannot be fully decorrelated a priori or have more complicated dependencies. I illustrate these methods for the case of cosmological parameter estimation using data likelihoods from the Planck satellite observations with dozens of fast nuisance parameters, and demonstrate a speed up by a factor of five or more. In more complicated cases, especially where the fast subspace is very fast but complex or highly correlated, the fast-slow sampling methods can in principle give arbitrarily large performance gains. The new samplers are implemented in the latest version of the publicly available CosmoMC code.","url_abs":"https://arxiv.org/abs/1304.4473v2","url_pdf":"https://arxiv.org/pdf/1304.4473v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"efficient-sampling-of-fast-and-slow","repo_url":"https://github.com/ClementLeloup/cosmomc_galileon","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"efficient-sampling-of-fast-and-slow","repo_url":"https://github.com/cmbant/CosmoMC","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"efficient-sampling-of-fast-and-slow","repo_url":"https://github.com/evamariam/cosmomc_sdss2020","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"efficient-sampling-of-fast-and-slow","repo_url":"https://github.com/nraffuzz/CosmoMC_GFE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1304.4473","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1304.4473"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/evamariam/cosmomc_sdss2020","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nraffuzz/CosmoMC_GFE","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ClementLeloup/cosmomc_galileon","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cmbant/CosmoMC","reach":null}],"summary":{"ran_draft_wrong":2,"ran_violates":2,"ran_honours":1,"unverified":1},"by_repo_kind":{"listed":{"samples":6,"ran":5,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"f85df2ee897f5d6c","entry":"lastTopComment","repo":"nraffuzz/CosmoMC_GFE","repo_kind":"listed","path":"python/CMBlikes.py","file_url":"https://github.com/nraffuzz/CosmoMC_GFE/blob/HEAD/python/CMBlikes.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f85df2ee897f5d6c"}},{"code_sha256_prefix":"da1d9dd7046936dc","entry":"planck_lensing","repo":"cmbant/CosmoMC","repo_kind":"listed","path":"python/planckStyle.py","file_url":"https://github.com/cmbant/CosmoMC/blob/HEAD/python/planckStyle.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da1d9dd7046936dc"}},{"code_sha256_prefix":"71637972cb396f96","entry":"planck_lensing_2015","repo":"cmbant/CosmoMC","repo_kind":"listed","path":"python/planckStyle.py","file_url":"https://github.com/cmbant/CosmoMC/blob/HEAD/python/planckStyle.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71637972cb396f96"}},{"code_sha256_prefix":"0d67adf422b83416","entry":"readTextCommentColumns","repo":"nraffuzz/CosmoMC_GFE","repo_kind":"listed","path":"python/CMBlikes.py","file_url":"https://github.com/nraffuzz/CosmoMC_GFE/blob/HEAD/python/CMBlikes.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0d67adf422b83416"}},{"code_sha256_prefix":"36004963d8da44b1","entry":"readWithHeader","repo":"nraffuzz/CosmoMC_GFE","repo_kind":"listed","path":"python/CMBlikes.py","file_url":"https://github.com/nraffuzz/CosmoMC_GFE/blob/HEAD/python/CMBlikes.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"36004963d8da44b1"}},{"code_sha256_prefix":"e21b5b18a3d5226c","entry":"get_camb_params","repo":"nraffuzz/CosmoMC_GFE","repo_kind":"listed","path":"python/cosmomc_to_camb.py","file_url":"https://github.com/nraffuzz/CosmoMC_GFE/blob/HEAD/python/cosmomc_to_camb.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e21b5b18a3d5226c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}