public class EpsilonGreedy extends BayesianBandit
Constructor and Description |
---|
EpsilonGreedy(int bandits,
double epsilon,
Random gen) |
Modifier and Type | Method and Description |
---|---|
boolean |
addModelDistribution(AbstractBayesianDistribution distribution) |
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.
|
getMean, iterator, rank
public EpsilonGreedy(int bandits, double epsilon, Random gen)
public int sample()
sample
in class BayesianBandit
public void train(int bandit, double reward)
train
in class BayesianBandit
bandit
- Which bandit got the impressionreward
- Did it pay off?public boolean addModelDistribution(AbstractBayesianDistribution distribution)
addModelDistribution
in class BayesianBandit
Copyright © 2013. All Rights Reserved.