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 hashes)
Built Distribution
Close
Hashes for masced_bandits-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eefdf69ed11164e27aa54a13fe770844c007f58e900d76cb0d9f406740e97ad0 |
|
MD5 | f5f8fd1fe9f265661b5f9d0aaf1040ae |
|
BLAKE2b-256 | 9ed992ef4bc1470e402b4d8c34f595f641571777dd1a4e92898b96dc1c1d4999 |