Reward classes

Classes for the environment and the reward model.

class bandit.reward.BaseReward(dist: Callable)[source]

Base class for rewards

Parameters:dist (Callable) – a random variable distribution that has an rvs method that returns a reward
class bandit.reward.GaussianReward(mean: float = 0, var: float = 1)[source]

A Gaussian random variable as a reward.

Parameters:
  • mean (float) – mean of the Gaussian reward
  • var (float) – variance of the Gaussian reward; must be positive
class bandit.reward.PoissonReward(mu: float = 1, loc: float = 0)[source]

Poisson random variable reward.

Parameters:
  • mu (float) – rate parameter (mean and var)
  • loc (float) – constant shift