The multi-armed bandit by Thompson Sampling, UCB-Upper confidence Bound, and randomized sampling.
Project description
Multi-armed bandit
Thompson
is Python package to evaluate the multi-armed bandit problem. In addition to thompson, Upper Confidence Bound (UCB) algorithm, and randomized results are also implemented. The thompson package implements three algorithms for solving the multi-armed bandit problem:
-
Thompson Sampling: A Bayesian approach that maintains probability distributions over the expected rewards of each arm and samples from these distributions to select the next arm to pull.
-
Upper Confidence Bound (UCB): A deterministic algorithm that selects arms based on their estimated rewards and the uncertainty in those estimates.
-
Randomized Sampling: A baseline method that randomly selects arms without considering their past performance.
The multi-armed bandit problem is a classic reinforcement learning problem that exemplifies the exploration-exploitation tradeoff dilemma. In this problem, a fixed limited set of resources must be allocated between competing choices in a way that maximizes expected gain, when each choice's properties are only partially known at the time of allocation.
⭐️ Star this repo if you like it ⭐️
Install thompson from PyPI
pip install thompson
Import thompson package
import thompson as th
Documentation pages
On the documentation pages you can find detailed information about the working of the thompson
with examples.
Examples
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file thompson-1.1.0.tar.gz
.
File metadata
- Download URL: thompson-1.1.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ed92b36cc1dc7eba81817a077b060f5869c168842146555107d1683bb891a4dc
|
|
MD5 |
d62f18689173ba94f8cf67651ad3d0c4
|
|
BLAKE2b-256 |
b289cb042405c1c00814fac4a6e3255fcbf5153304eaa9c71423592706ba62e3
|
File details
Details for the file thompson-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: thompson-1.1.0-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c0ee76aa50096bc4f5b06325e8ebd3f2bf547745912c25c487aff915c2fd1d81
|
|
MD5 |
0b24496dff4f354f55913a9e10c1a844
|
|
BLAKE2b-256 |
79c21b00a6f4c7c06779115e0b8f1db53940fb38f8b1aa0353d11c485548040a
|