bandit-class: A bandit reference class (RC) object.

Description Arguments Details Fields See Also Examples

Description

A bandit reference class (RC) object.

Arguments

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 y

data

a data frame (or object coercible by as.data.frame to a data frame) containing the variables in the model. data must contain a column named id that uniquely identifies each observation, and a column named y that contains the model response.

family

a character string describing the error distribtion and link function to be used in the model. Can be either "binomial" or "gaussian" (the default).

contrasts

an optional list. See the contrasts.arg of model.matrix.default.

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 odbcDriverConnect.

path

an optional character string naming a folder open for writing.

Details

The RC "bandit" class is the main object defined in banditr. It allows to manage bandit experiments easily. Two classes inherit from "bandit": the "bandit_ucb" class for LinUCB algorithms, and the "bandit_thompson" for Thompson sampling algorithms.

The introductory vignette provides a detailed explanation of bandit algorithms, and their implementation with banditr. See the Examples section.

Fields

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model that is fitted.

contrasts

an optional list. See the contrasts.arg of model.matrix.default.

newLevels

a logical value indicating whether to allow for new factor levels when adding samples.

xlevels

if newLevels is false, a record of the levels of the factors used in fitting.

currentJob

a numeric with the id of the current job.

currentModel

the prototype of the latest fit.

currentParams

a list of tuning parameters.

banditData

the bandit's data.

statistics

a character vector of statistics to be computed when adding outcomes

See Also

bandit_ucb, bandit_thompson

Examples

1
vignette("introduction", "banditr")

rferrali/banditr documentation built on May 27, 2019, 5:56 a.m.