{"id":22966291,"url":"https://github.com/ethanuppal/metropolis","last_synced_at":"2025-08-13T08:32:57.592Z","repository":{"id":167064548,"uuid":"630726088","full_name":"ethanuppal/metropolis","owner":"ethanuppal","description":"An implementation of the Metropolis algorithm.","archived":false,"fork":false,"pushed_at":"2023-04-21T02:36:24.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-29T23:11:26.337Z","etag":null,"topics":["bayesian","monte-carlo","statistics"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/ethanuppal.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}},"created_at":"2023-04-21T02:36:22.000Z","updated_at":"2023-04-21T02:37:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad485a61-4990-4a55-ab8c-726cfdfbede3","html_url":"https://github.com/ethanuppal/metropolis","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"a6b67bcbf4f07af0597f8aee39634c5e4d9ddd9f"},"previous_names":["ethanuppal/metropolis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fmetropolis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fmetropolis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fmetropolis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fmetropolis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethanuppal","download_url":"https://codeload.github.com/ethanuppal/metropolis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229749472,"owners_count":18118370,"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":["bayesian","monte-carlo","statistics"],"created_at":"2024-12-14T20:18:28.708Z","updated_at":"2024-12-14T20:18:29.290Z","avatar_url":"https://github.com/ethanuppal.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# metropolis\n\nThis repository contains my implementation of the [Metropolis algorithm](src/MCMC/Metropolis.swift), which is used for Bayesian statistical analysis, as well as a [custom graph renderer](src/Graphics/Graph.swift). Here is example output from a run of the program.\n\n![A histogram showing an example run of the Metropolis algorithm.](assets/ex_run.png)\n\n```\nBayesian Analysis\nusing Markov chain Monte Carlo\n==============================\n\nObservations\n------------\n  - 2 coin flips\n  - 1 head(s)\n\nPrior\n-----\n  We use an uninformed prior: beta(a=1, b=1)\n\nLikelihood\n----------\n  P(data|θ) = bernoulli(N=2, z=1)\n\nMetropolis\n----------\n  We perform the metropolis algorithm to estimate the central tendency of the posterior distribution.\n  Random seed: 0.834189865344514\n  Steps: 10000\n  Burn-in Period: 3000\n  Est. Mean: 0.4934783753798731\n  Est. StdDev: 0.22304677011859197\n\nActual\n------\n  P(θ|data) = beta(a=2, b=2)\n  Act. Mean: 0.5 (-1.0% error)\n  Act. StdDev: 0.22360679774997896 (-0.0% error)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanuppal%2Fmetropolis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanuppal%2Fmetropolis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanuppal%2Fmetropolis/lists"}