Convert object to a Prediction or a list of Prediction.
Usage
as_prediction(x, check = FALSE, ...)
# S3 method for class 'Prediction'
as_prediction(x, check = FALSE, ...)
# S3 method for class 'PredictionDataClassif'
as_prediction(x, check = FALSE, ...)
# S3 method for class 'PredictionDataRegr'
as_prediction(x, check = FALSE, ...)
as_predictions(x, predict_sets = "test", ...)
# S3 method for class 'list'
as_predictions(x, predict_sets = "test", ...)
Arguments
- x
(any)
Object to convert.- check
(
logical(1)
)
Perform argument checks and type conversions?- ...
(any)
Additional arguments.- predict_sets
(
character()
)
Prediction sets to operate on, used inaggregate()
to extract the matchingpredict_sets
from the ResampleResult. Multiple predict sets are calculated by the respective Learner duringresample()
/benchmark()
. Must be a non-empty subset of{"train", "test", "internal_valid"}
. If multiple sets are provided, these are first combined to a single prediction object. Default is"test"
.