{"id":16111092,"url":"https://github.com/roma-glushko/posterior","last_synced_at":"2025-08-02T10:13:30.660Z","repository":{"id":102205031,"uuid":"352176114","full_name":"roma-glushko/posterior","owner":"roma-glushko","description":"🎲 A lightweight framework for Bayes inference.","archived":false,"fork":false,"pushed_at":"2021-11-03T19:40:33.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T06:30:49.166Z","etag":null,"topics":["bayesian-inference","data-science","framework","statistics"],"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/roma-glushko.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}},"created_at":"2021-03-27T21:00:23.000Z","updated_at":"2021-11-08T10:31:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"408af07a-7c55-45a0-89e3-a8e3b941dad7","html_url":"https://github.com/roma-glushko/posterior","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roma-glushko/posterior","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fposterior","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fposterior/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fposterior/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fposterior/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roma-glushko","download_url":"https://codeload.github.com/roma-glushko/posterior/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-glushko%2Fposterior/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268370180,"owners_count":24239766,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-inference","data-science","framework","statistics"],"created_at":"2024-10-09T19:40:20.211Z","updated_at":"2025-08-02T10:13:30.630Z","avatar_url":"https://github.com/roma-glushko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Posterior\n\nA lightweight framework for Bayes's inference.\n\n## Usage\n\n```python\n\n\"\"\"\nProblem:\n    There are two bowls of cookies.\n    Bowl 1 contains 30 vanilla cookies and 10 chocolate cookies.\n    Bowl 2 contains 20 of each.\n    You choose one of the bowls at random and, without looking, then select a cookie at random.\n    The cookie is vanilla.\n    What is the probability that it came from Bowl 1?\n\"\"\"\n\nfrom posterior.hypotheses import Hypotheses\n\ncookie_likelihood = {\n    \"bowl1\": {\n        \"chocolate\": 1 / 4,\n        \"vanilla\": 3 / 4\n    },\n    \"bowl2\": {\n        \"chocolate\": 1 / 2,\n        \"vanilla\": 1 / 2,\n    },\n}\n\nhypotheses = Hypotheses([\"bowl1\", \"bowl2\"], likelihood=cookie_likelihood)\nhypotheses.evaluate(\"vanilla\")\n\nprint(hypotheses)\n```\n\nOutput:\n\n```bash\n╒════════════╤═════════════════╕\n│ Outcomes   │   Probabilities │\n╞════════════╪═════════════════╡\n│ bowl1      │             0.6 │\n├────────────┼─────────────────┤\n│ bowl2      │             0.4 │\n╘════════════╧═════════════════╛\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froma-glushko%2Fposterior","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froma-glushko%2Fposterior","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froma-glushko%2Fposterior/lists"}