trainThis 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
caretPredict(object, newdata = NULL, excluded_class_id = 1L, ...)a data.table
a train object
New data to use for predictions. If NULL, stacked predictions from the training data are returned.
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