{"id":17548682,"url":"https://github.com/djo/delayed-bandit","last_synced_at":"2025-04-24T00:43:22.733Z","repository":{"id":54508332,"uuid":"338886797","full_name":"djo/delayed-bandit","owner":"djo","description":"Multi-armed bandit problem under delayed feedback: framework for the numerical experiments","archived":false,"fork":false,"pushed_at":"2023-04-13T16:52:28.000Z","size":191,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T05:11:33.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":false,"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/djo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-14T19:41:57.000Z","updated_at":"2025-01-10T18:34:15.000Z","dependencies_parsed_at":"2025-03-07T00:31:36.634Z","dependency_job_id":"60e46a55-adda-4611-a1ac-f4338f85a95b","html_url":"https://github.com/djo/delayed-bandit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djo%2Fdelayed-bandit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djo%2Fdelayed-bandit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djo%2Fdelayed-bandit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djo%2Fdelayed-bandit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djo","download_url":"https://codeload.github.com/djo/delayed-bandit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540939,"owners_count":21447426,"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-21T02:24:46.138Z","updated_at":"2025-04-24T00:43:22.711Z","avatar_url":"https://github.com/djo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-armed bandit (MAB) problem under delayed feedback: numerical experiments\n\n![Build](https://github.com/djo/delayed-bandit/workflows/Python%20application/badge.svg)\n\nThe framework for numerical experiments to simulate the multi-armed bandit in the stochastic stationary environment with delays.\n\n## Beta Upper Confidence Bound Policy for the Design of Clinical Trials, 2023\n\nEvaluation of the adapted to delays policies using the publicly available dataset The International Stroke Trial. See [this notebook](Beta-Upper-Confidence-Bound-Policy-for-the-Design-of-Clinical-Trials.ipynb) for the analysis and simulation. \n\n## Bernoulli multi-armed bandit problem under delayed feedback, 2021\n\nProvides the framework for numerical experiments to simulate the multi-armed bandit problem\nin the stochastic stationary environment with delays. Part of the paper [Bernoulli multi-armed bandit problem under delayed feedback](https://djo.github.io/assets/bernoulli-multi-armed-bandit-problem-under-delayed-feedback.pdf)\n([Journal](https://bphm.knu.ua/index.php/bphm/article/view/214)).\n\nStructure of the project and currently implemented algorithms:\n\n||Files|\n|-|-|\n|Environments|[Protocol](delayed_bandit/environments/environment.py)|\n||[Bernoulli MAB](delayed_bandit/environments/bernoulli_bandit.py)|\n|Policies|[Protocol](delayed_bandit/policies/policy.py)|\n||[Uniform Random](delayed_bandit/policies/uniform_random.py)|\n||[Explore-First](delayed_bandit/policies/etc.py)|\n||[Epsilon-Greedy](delayed_bandit/policies/epsilon_greedy.py)|\n||[Upper Confidence Bound](delayed_bandit/policies/ucb.py)|\n||[Thompson Sampling (Beta distribution)](delayed_bandit/policies/beta_thompson_sampling.py)|\n|Experiments|[Bernoulli MAB under delayed feedback](delayed_bandit/experiments.py)|\n|Tests|[Test module](delayed_bandit/test/)|\n\nTo run experiments on Bernoulli MAB see\n```\npython delayed_bandit/experiments.py --help\n```\n\nOne might want to run a significant number of experiments and aggregate the result by removing outliers and averaging.\nThe sampling of delays might be fixated over the horizon.\n\n![Bernoulli MAB under delayed feedback with Explore-First algorithm](bernoulli-mab-explore-then-commit.png)\n\n![Comparison of algorithms in Bernoulli MAB with no delays](all-algorithms-no-delay.png)\n\n![Comparison of algorithms in Bernoulli MAB under delay t=50](all-algorithms-delay-50.png)\n\n![Comparison of algorithms in Bernoulli MAB under delay t=150](all-algorithms-delay-150.png)\n\n### Development\n\n```\npython3 -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n./pychecks.sh\n```\n\nMIT License\n\nCopyright (c) 2023 Andrii Dzhoha\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjo%2Fdelayed-bandit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjo%2Fdelayed-bandit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjo%2Fdelayed-bandit/lists"}