[−][src]Trait ratel_bandit::Bandit
A trait for common members of the Bandits
Required methods
fn arms(&self) -> usize
The number of arms of the Bandit
fn best_arm(&self) -> usize
The arm with the highest average reward.
fn mean(&self, arm: usize) -> f64
The average reward of a given arm.
fn reward(&self, arm: usize) -> T
The reward from a pull of a given arm.
fn std(&self, arm: usize) -> f64
The standard deviation of a given arm.
Provided methods
fn max_reward(&self) -> f64
The maximum average reward of all the arms.
fn means(&self) -> Vec<f64>
The average rewards of all the arms.
fn stds(&self) -> Vec<f64>
the standard deviations of all the arms.
Implementors
impl<'a> Bandit<f64> for ExponentialBandit<'a>
[src]
fn arms(&self) -> usize
[src]
Returns the number of arms on the bandit.
fn best_arm(&self) -> usize
[src]
Returns the arm with highest average reward.
fn mean(&self, arm: usize) -> f64
[src]
The expected return of each arm.
fn reward(&self, arm: usize) -> f64
[src]
Determines the reward for pulling a given arm.
fn std(&self, arm: usize) -> f64
[src]
The standard deviations of each arm.
impl<'a> Bandit<f64> for GaussianBandit<'a>
[src]
fn arms(&self) -> usize
[src]
Returns the number of arms on the bandit.
fn best_arm(&self) -> usize
[src]
Returns the arm with highest average reward.
fn mean(&self, arm: usize) -> f64
[src]
The expected return of each arm.
fn reward(&self, arm: usize) -> f64
[src]
Determines the reward for pulling a given arm.
fn std(&self, arm: usize) -> f64
[src]
The standard deviations of each arm.
impl<'a> Bandit<f64> for LogNormalBandit<'a>
[src]
fn arms(&self) -> usize
[src]
Returns the number of arms on the bandit.
fn best_arm(&self) -> usize
[src]
Returns the arm with highest average reward.
fn mean(&self, arm: usize) -> f64
[src]
The expected return of each arm.
fn reward(&self, arm: usize) -> f64
[src]
Determines the reward for pulling a given arm.
fn std(&self, arm: usize) -> f64
[src]
The standard deviations of each arm.
impl<'a> Bandit<u32> for BinomialBandit<'a>
[src]
fn arms(&self) -> usize
[src]
Returns the number of arms on the bandit.
fn best_arm(&self) -> usize
[src]
Returns the arm with highest average reward.
fn mean(&self, arm: usize) -> f64
[src]
Computes the expected return of each arm.
fn reward(&self, arm: usize) -> u32
[src]
Determines the reward for pulling a given arm.
fn std(&self, arm: usize) -> f64
[src]
Computes the standard deviations of each arm.