View source: R/best_poisson_bandit.R
best_poisson_bandit | R Documentation |
Compute the Bayesian probabilities for each arm being the best poisson bandit.
best_poisson_bandit(x, n = NULL)
x |
as in prop.test, a vector of the number of successes; it may alternatively be a list of vectors of the results of each trial, if n is not provided |
n |
as in prop.test, a vector of the number of trials; if it is not provided, x must be a list of vectors of the results of each trial |
a vector of probabilities for each arm being the best poisson bandit; this can be used for future randomized allocation
Thomas Lotze <thomaslotze@thomaslotze.com>
Steven L. Scott, A modern Bayesian look at the multi-armed bandit, Appl. Stochastic Models Bus. Ind. 2010; 26:639-658. (http://www.economics.uci.edu/~ivan/asmb.874.pdf)
prop.test
p1 = rpois(100, lambda=10) p2 = rpois(100, lambda=9) x = sapply(list(p1, p2), sum) n = sapply(list(p1, p2), length) best_poisson_bandit(x,n)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.