Learn R Programming

caretEnsemble (version 4.0.1)

caretPredict: Prediction wrapper for train

Description

This is a prediction wrapper for train with several features: - If newdata is null, return stacked predictions from the training job, rather than in-sample predictions. - Always returns probabilities for classification models. - Optionally drops one predicted class for classification models. - Always returns a data.table

Usage

caretPredict(object, newdata = NULL, excluded_class_id = 1L, ...)

Value

a data.table

Arguments

object

a train object

newdata

New data to use for predictions. If NULL, stacked predictions from the training data are returned.

excluded_class_id

an integer indicating the class to exclude. If 0L, no class is excluded

...

additional arguments to pass to predict.train, if newdata is not NULL