predict_ensemble: Generate class prediction probabilities

Description Usage Arguments Value

View source: R/bayeserror.R

Description

This function will generate class prediction probabilities on a dataset from a list of classifiers using a specified resampling method.

Usage

1
predict_ensemble(x, y, classifiers, v = 10L)

Arguments

x

A matrix with observations as rows and features as columns.

y

A vector of 0/1 response classes

classifiers

A list of classifier functions. Each function should be of the form f(x, y, newdata) and have the attribute shortname to identify its predictions.

v

For k-fold cross-validation, use an integer to specify the number of folds. For instance, v = 10 means to use 10-fold CV. For a holdout split, use a number between 0.0 to 1.0 specifying the percent to be held out to make predictions. For in-sample predictions, use v = 0.

Value

A three-dimensional array containing class prediction probabilities. Its dimesions are as (observation, class, classifier). The last entry on the third dimension is "AVE", the predictions for the ensemble classifier.


ryanholbrook/bayeserror documentation built on Jan. 12, 2020, 6:25 p.m.