Learn R Programming

boostr (version 1.0.0)

predictResponseFromWeightedAverage: Predict a numeric response using (un)weighted averaging.

Description

Process a matrix of predicted responses and form a column-wise estimate based on (un)weighted averaging.

Usage

predictResponseFromWeightedAverage(preds, weights, .parallel, ...)

Arguments

preds
is matrix of predicted classes
weights
is a vector of length equal to nrow(preds)
.parallel
is a boolean flag determining whether to work across columns of preds in parallel -- need to register a parallel backend (e.g. doParallel, doRedis) for this to actually work.
...
additional arguments to pass to weighted.mean.

Value

a vector of length equal to ncol(preds) containing the estimated response for each column of preds.

Details

Gives the prediction from row(i) in preds weight equal to weights[i]. Note that NA's are not removed. To have weighted.mean remove the NA's pass na.rm=TRUE to the function call.