| bandit_ucb-class | R Documentation | 
An UCB bandit reference class (RC) object.
bandit_ucb(formula, data, family = c("gaussian", "binomial"),
           alpha = 1, contrasts = NULL, newLevels = FALSE,
           db = NULL, path = NULL)
| formula | an object of class "formula" (or one that can be coerced
to that class): a symbolic description of the model that is fitted. The response
must be named  | 
| data | a data frame (or object coercible by  | 
| family | a character string describing the error distribtion and link function
to be used in the model. Can be either  | 
| alpha | the LinUCB tuning parameter. A positive scalar. Higher values of
 | 
| contrasts | an optional list. See the  | 
| newLevels | a logical value indicating whether to allow for new factor levels when adding samples. Default is FALSE. | 
| db | an optional named list of arguments passed to  | 
| path | an optional character string naming a folder open for writing. | 
The RC class "bandit_ucb" inherits from class "bandit".
The introductory vignette provides a detailed explanation of LinUCB algorithms, and
their implementation with banditr. See the Examples section.
alphathe linear UCB tuning parameter. See details.
familysupported response type. See banditGlmnet for details.
train(parRidge = NULL, parLasso = NULL, seed = NULL) trains the model using
banditGlmnet and all completed experiments.
parRidge and parLasso are optional lists of
parameters passed to banditGlmnet to control the fitting process.
seed is an optional seeding value for the random number generator.
tune(param = 'lambdaRidge', value = 'auto', lambdaAuto = 'lambda.1se',
parCvGlmnet = NULL, seed = NULL) set the value of a tuning parameter of the bandit. param is either
'lambdaRidge' (the default) or 'lambdaLasso'. Setting
lambdaLasso > 0 enables a first stage of variable selection.
value is either a scalar in [0,1] or 'auto'. If
set to 'auto', the parameter is picked using cv.glmnet.
lambdaAuto is either 'lambda.1se' or 'lambda.min'
depending on which outcome of cv.glmnet should be selected. It
is ignored if value is not 'auto'. parCvGlmnet is a list of
parameters passed to cv.glmnet. This parameter is ignored if
value is not 'auto'.
addSamples(df) add samples to the bandit. df is coercible to
a data.frame, and can be appended to the data.frame used at creation.
In particular, it contains an id column that is a primary key.
addOutcomes(y) add outcomes to the bandit. y is a named vector
whose names are samples ids.
undo() cancel the last job.
bandit, bandit_thompson
vignette("introduction", "banditr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.