{"id":24563626,"url":"https://github.com/fr3fou/polo","last_synced_at":"2025-10-24T07:42:29.103Z","repository":{"id":57631117,"uuid":"293512950","full_name":"fr3fou/polo","owner":"fr3fou","description":"markov chain implementation in go","archived":false,"fork":false,"pushed_at":"2022-06-24T13:29:03.000Z","size":69,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T20:44:03.204Z","etag":null,"topics":["go","golang","hacktoberfest","markov","markov-chain"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fr3fou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-07T11:47:21.000Z","updated_at":"2024-04-25T15:46:33.000Z","dependencies_parsed_at":"2022-09-26T20:11:36.631Z","dependency_job_id":null,"html_url":"https://github.com/fr3fou/polo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fr3fou/polo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr3fou%2Fpolo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr3fou%2Fpolo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr3fou%2Fpolo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr3fou%2Fpolo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fr3fou","download_url":"https://codeload.github.com/fr3fou/polo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fr3fou%2Fpolo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261845225,"owners_count":23218513,"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":["go","golang","hacktoberfest","markov","markov-chain"],"created_at":"2025-01-23T10:14:09.870Z","updated_at":"2025-10-24T07:42:24.078Z","avatar_url":"https://github.com/fr3fou.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polo\n\nA Markov chain implementation in Go.\n\n![image](https://user-images.githubusercontent.com/1344906/134421146-e336e747-0aa1-41f4-8749-4a1f6872b0a7.png)\n\n```bash\n➜ polo git:(master) ✗ go run .\nP(Sunny|Sunny) = 0.80\nP(Rainy|Sunny) = 0.05\nP(Cloudy|Sunny) = 0.15\n\nP(Sunny|Rainy) = 0.20\nP(Rainy|Rainy) = 0.60\nP(Cloudy|Rainy) = 0.20\n\nP(Sunny|Cloudy) = 0.20\nP(Rainy|Cloudy) = 0.30\nP(Cloudy|Cloudy) = 0.50\n\n\nThe probability of tomorrow being Sunny, given that today was Rainy is 0.2\n\nThe next state, given that today was Sunny is Sunny\n```\n\n## TODO\n\n- [x] Basic Markov Chain\n- [x] Fix `Chain.Next()`\n- [x] Implement `cumsum` and implement better `rand.Sample` algorithm\n- [x] Drawing/Visualizing a graph of chain with probabilities\n- [x] Higher Order Chains\n\n## References\n\n- \u003chttp://cecas.clemson.edu/~ahoover/ece854/refs/Ramos-Intro-HMM.pdf\u003e\n- \u003chttps://www.davidsilver.uk/wp-content/uploads/2020/03/MDP.pdf\u003e\n- \u003chttps://www.wikiwand.com/en/Pseudo-random_number_sampling\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffr3fou%2Fpolo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffr3fou%2Fpolo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffr3fou%2Fpolo/lists"}