View source: R/sim_rand_bandit.R
In this function we assume that the true expectation of each lever can be expressed as linear combination of known basis functions with known coefficients.
1 2 3 4 5 6 7 8 9 10 11 | sim_rand_bandit(
nsteps,
nlevers,
J_mod,
J_true,
sd,
alpha = 1,
alpha_true = 1,
calc_mse = FALSE,
b = 2
)
|
nsteps |
The number of steps to make in the trajectory. |
nlevers |
The number of levers to choose from. |
J_mod |
The number of basis functions to use in the model (not including) the intercept. |
J_true |
The number of basis functions to be used in the expression for each lever's true expectation. |
sd |
A vector of the standard deviations of each lever. |
alpha |
A scaling parameter which tunes how the prior variance decreases as J_mod increases. |
alpha_true |
The true scaling parameter that the coefficients are generated from. |
calc_mse |
True, if you want to output the mse for the beta coefficients. |
b |
Hyperparameter for the inverse gamma distribution. Directly related to the rate of exploration. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.