https://github.com/a-poor/bayesian-bandit
Modeling a 1-armed bandit with pystan.
https://github.com/a-poor/bayesian-bandit
arviz bayes multi-armed-bandit pystan python
Last synced: about 2 months ago
JSON representation
Modeling a 1-armed bandit with pystan.
- Host: GitHub
- URL: https://github.com/a-poor/bayesian-bandit
- Owner: a-poor
- License: gpl-3.0
- Created: 2020-09-09T17:06:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-09T21:38:15.000Z (over 4 years ago)
- Last Synced: 2025-03-26T06:35:57.324Z (about 2 months ago)
- Topics: arviz, bayes, multi-armed-bandit, pystan, python
- Language: Jupyter Notebook
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bayesian-bandit
_created by Austin Poor_
[](https://mybinder.org/v2/gh/a-poor/bayesian-bandit/master?filepath=bayes-bandit.ipynb&urlpath=lab)
[](https://nbviewer.jupyter.org/github/a-poor/bayesian-bandit/blob/master/bayes-bandit.ipynb#)Using [`pystan`](https://mc-stan.org/) to approach a simplified version of the [multi-armed bandit problem](https://en.wikipedia.org/wiki/Multi-armed_bandit), where the goal is to use bayesian modeling to predict the probability of success for an unknown process.
The notebook [bayes-bandit.ipynb](./bayes-bandit.ipynb) has the analysis code and the file [bandit.py](./bandit.py) has a 1-armed-bandit class used by the notebook.
## Run the Code
### Binder
To run the notebook using Binder, click the badge above or use [this link](https://mybinder.org/v2/gh/a-poor/bayesian-bandit/master?filepath=bayes-bandit.ipynb&urlpath=lab).
### Docker
There's an included [docker-compose file](./docker-compose.yml), for running the notebook in a container, which can be run with the command:
```bash
$ docker-compose up
```