Skip to contents

Convert object to a Prediction or a list of Prediction.

Usage

as_prediction(x, check = FALSE, ...)

# S3 method for Prediction
as_prediction(x, check = FALSE, ...)

# S3 method for PredictionDataClassif
as_prediction(x, check = FALSE, ...)

# S3 method for PredictionDataRegr
as_prediction(x, check = FALSE, ...)

as_predictions(x, predict_sets = "test", ...)

# S3 method for 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 in aggregate() to extract the matching predict_sets from the ResampleResult. Multiple predict sets are calculated by the respective Learner during resample()/benchmark(). Must be a non-empty subset of {"train", "test", "holdout"}. If multiple sets are provided, these are first combined to a single prediction object. Default is "test".

Value

Prediction.