Skip to content

rssalessio/py-lower-bound-bai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

py-lower-bound-bai

Python utilities to compute a lower bound of the expected sample complexity to identify the best arm in a bandit model

Requirements

Python 3 and the following libraries

  • Numpy
  • Scipy
  • Cython

pip install cython numpy scipy

Usage

Check the example files

import numpy as np
import pyximport
_ = pyximport.install()
from math_func_cython import solveFBern

mu = [0.6, 0.5]

w, Tinv = solveFBern(np.ascontiguousarray(np.sort(mu)[::-1]))
print("T^(-1): {}".format(Tinv))
print("Sample complexity: {}".format(1/Tinv))
print("Optimal weights: {}".format(w))

About

Python utilities to compute a lower bound of the expected sample complexity to identify the best arm in a bandit model

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published