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.0.tar.gz
(11.5 kB
view hashes)
Built Distribution
Close
Hashes for masced_bandits-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf5cd2e9561663d5d8735a36082bd05e9bdae7221c736da8bceacb778e70f2b |
|
MD5 | d05fac1b689f0df503e99cc9bd9b4f0e |
|
BLAKE2b-256 | 0837d8b47775f0bd8d094ad2678de2aaed5f8ad35fa0651060f61815a8f16ab8 |