predictClassViaVoting: Predict a class using (un)weighted voting.

Description Usage Arguments Details Value

Description

Process a matrix of class predictions and form a column-wise estimate based on weighted voting.

Usage

1
2
3
4
predictClassFromWeightedVote(preds, weights, .parallel = FALSE,
  .rngSeed = 1234)

predictClassFromVote(preds, .parallel = FALSE, .rngSeed = 1234)

Arguments

preds

is (character) 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.

.rngSeed

the value of the RNG seed to be used in the case that ties are to be randomly broken.

Details

Gives the vote from row(i) in preds weight equal to weights[i]. Ties are broken randomly, but before so, the seed is set to .rngSeed.

Value

a character vector of length equal to ncol(preds) containing the class estimates per column of preds.


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