{"id":16505542,"url":"https://github.com/davidbrochart/mcmc","last_synced_at":"2025-07-18T08:36:32.307Z","repository":{"id":88094089,"uuid":"103769629","full_name":"davidbrochart/mcmc","owner":"davidbrochart","description":"MCMC samplers: Metropolis-Hastings and Sequential Monte Carlo","archived":false,"fork":false,"pushed_at":"2019-07-24T15:52:38.000Z","size":141,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T17:41:30.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidbrochart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-16T17:11:07.000Z","updated_at":"2024-05-17T09:12:51.000Z","dependencies_parsed_at":"2023-05-18T07:01:06.940Z","dependency_job_id":null,"html_url":"https://github.com/davidbrochart/mcmc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidbrochart/mcmc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbrochart%2Fmcmc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbrochart%2Fmcmc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbrochart%2Fmcmc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbrochart%2Fmcmc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidbrochart","download_url":"https://codeload.github.com/davidbrochart/mcmc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbrochart%2Fmcmc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265728952,"owners_count":23818733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T15:12:20.255Z","updated_at":"2025-07-18T08:36:32.299Z","avatar_url":"https://github.com/davidbrochart.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a simple implementation of Markov Chain Monte Carlo samplers. Two\nalgorithms are currently provided. They are mostly stolen from\n[PyMC3](https://github.com/pymc-devs/pymc3).\n\n- **Metropolis-Hastings**\n```python\nimport mcmc\n# just provide initial values (q0) and a function returning the log-probability\n# (logp)\nsampler = mcmc.sampler(q0, logp)\nsamples = sampler.sample(1000)\n```\n\n![alt text](examples/triangle.png)\n\n- **Sequential Monte Carlo**\n```python\nimport smc\n# just provide the prior PDF (x), the likelihood log-probability, and the prior\n# log-probability\nsamples = smc(x, likelihood_logp, prior_logp)\n```\n\n# Install\n\n`pip install git+https://github.com/davidbrochart/mcmc`\n\nor clone this repository and `pip install -e mcmc`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbrochart%2Fmcmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbrochart%2Fmcmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbrochart%2Fmcmc/lists"}