caretPredict: Prediction wrapper for 'train'

View source: R/caretPredict.R

caretPredictR Documentation

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, ...)

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

Value

a data.table


caretEnsemble documentation built on Sept. 13, 2024, 1:11 a.m.