Description Usage Arguments Details Value
Obtains predictions from a bandit object.
1 2 3 4 5 6 7 8 9 10 |
object |
an object inheriting from class |
whatSamples |
the samples with which to predict. The default is all samples
with a missing outcome. .
Alternatives are |
whatModel |
the fitted model with which to predict. The default uses the last fitted model; alternatively, the job id of a training job can be supplied. |
type |
the type of prediction required. See Details. |
robust |
logical switch indicating whether generalized Moore-Penrose inverse should be used if regular inversion fails when computing uncertainty. |
re.form |
same as |
The predict
method predictions using some model in
the bandit. It is used to select the next experimental arm.
For all methods, the type
parameter may take values "link"
and
"response"
, for predictions on the scale of the linear predictors, and
on the scale of the response variable respectively. Thus, for a default binomial
model, type = "response"
returns log-odds, while type = "link"
returns
predicted probabilities.
Objects of class "bandit_ucb"
also support types
"uncertainty"
, and "score"
. Uncertainty is used to compute the score,
with score = response + alpha uncertainty.
Objects of class "bandit_thompson"
also support type "weight"
, the
Thompson sampling weights.
If the type
parameter has length 1, a vector of predictions.
Otherwise, a data frame of predictions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.