Skip to main content

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


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)

Uploaded Source

Built Distribution

masced_bandits-1.0.1-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

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

Hashes for masced_bandits-1.0.1.tar.gz
Algorithm Hash digest
SHA256 29d593d1356844d10572ab3b59d920c07736a35487e4cee61c6817479b7290a1
MD5 bcbfccf98e64c48fe353acf50a73247a
BLAKE2b-256 13d0ce7b67060df350aa45e06988613396bf3590eafbdf88c257b2a91ae40c95

See more details on using hashes here.

File details

Details for the file masced_bandits-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for masced_bandits-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eefdf69ed11164e27aa54a13fe770844c007f58e900d76cb0d9f406740e97ad0
MD5 f5f8fd1fe9f265661b5f9d0aaf1040ae
BLAKE2b-256 9ed992ef4bc1470e402b4d8c34f595f641571777dd1a4e92898b96dc1c1d4999

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page