Library to compute Gittins and Whittle index for Markovian Bandits
Project description
Markovian Bandits
This repository contains a python library to compute whittle or indices for finite-state Markovian bandit problems.
Installation
To install, just run:
pip install markovianbandit-pkg
Example
from markovianbandit import markovianbandit as bandit
model = bandit.random_restless(dim=4)
print(model.whittle_indices()) # should print (True, array([ 0.51679937, -0.09224213, 0.32943948, 0.29512467]))
model = bandit.random_restless(4, seed=2791)
print(model.is_indexable()) # should print False
model = bandit.random_rested(dim=4)
print(model.gittins_indices(discount=.8)) # computes gittins index
Reference
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
Close
Hashes for markovianbandit-pkg-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c66e426d35873930d6696526a84d620a405760962ddca0fe7c112da39149b43c |
|
MD5 | 314ad81bcdab7010db81754d84495562 |
|
BLAKE2b-256 | fac648ca6cc0ffde3203f78f741e57e35b35dc3ece7d3b4794ba6c67cb56436c |
Close
Hashes for markovianbandit_pkg-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcecb7f75b950404da9adf5acf74fccbe253beb5a2db1846fd5d4190b1b369d0 |
|
MD5 | e2590512fd09a081109a3f8be5a2a87e |
|
BLAKE2b-256 | bbca0ba1eb40edcf18604e6be08b6b6dc8cb358b9e0b4104cb770b676635a3cb |