public abstract class BayesianBandit extends Object implements Iterable<AbstractBayesianDistribution>
| Constructor and Description |
|---|
BayesianBandit() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addModelDistribution(AbstractBayesianDistribution distribution) |
double |
getMean(int k)
Returns the mean of a particular distribution in the bandit
|
Iterator<AbstractBayesianDistribution> |
iterator()
Returns an iterator over a set of elements of type T.
|
List<Integer> |
rank(int sampleSize)
Samples probability estimates from each bandit and orders the bandits in increasing order.
|
int |
sample()
Samples probability estimates from each bandit and picks the apparent best
|
void |
train(int bandit,
double reward)
Apply feedback to the bandit we chose.
|
public int sample()
public void train(int bandit,
double reward)
bandit - Which bandit got the impressionreward - Did it pay off?public boolean addModelDistribution(AbstractBayesianDistribution distribution)
public List<Integer> rank(int sampleSize)
sampleSize - The number of bandits to sample.public double getMean(int k)
public Iterator<AbstractBayesianDistribution> iterator()
iterator in interface Iterable<AbstractBayesianDistribution>Copyright © 2013. All Rights Reserved.