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

Description Usage Arguments Details Value

View source: R/predictResponseFromWeightedAverage.R

Description

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

Usage

1

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.

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.

Value

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


boostr documentation built on May 2, 2019, 1:42 p.m.