multi-armed bandit policies
Project description
MASCed_bandits
This is a library of multi-armed bandit policies. As of the most recent version the following policies are included: UCB, UCB-Improved, EXP3, EXP3S, EXP4, EwS, ETC, Discounted UCB, Sliding Window UCB, e-greedy.
Example
from masced_bandits.bandit_options import initialize_arguments
from masced_bandits.bandits import init_bandit
import numpy as np
initialize_arguments(["Arm1","Arm2"], 0)
ucb_instance = init_bandit(name='UCB')
for i in range(100):
arms_chosen = []
reward = np.random.random()
arms_chosen.append(ucb_instance.get_next_arm(reward))
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
masced_bandits-1.0.1.tar.gz
(11.3 kB
view details)
Built Distribution
File details
Details for the file masced_bandits-1.0.1.tar.gz
.
File metadata
- Download URL: masced_bandits-1.0.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d593d1356844d10572ab3b59d920c07736a35487e4cee61c6817479b7290a1 |
|
MD5 | bcbfccf98e64c48fe353acf50a73247a |
|
BLAKE2b-256 | 13d0ce7b67060df350aa45e06988613396bf3590eafbdf88c257b2a91ae40c95 |
File details
Details for the file masced_bandits-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: masced_bandits-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eefdf69ed11164e27aa54a13fe770844c007f58e900d76cb0d9f406740e97ad0 |
|
MD5 | f5f8fd1fe9f265661b5f9d0aaf1040ae |
|
BLAKE2b-256 | 9ed992ef4bc1470e402b4d8c34f595f641571777dd1a4e92898b96dc1c1d4999 |