Learn R Programming

mlr3 (version 0.12.0)

as_prediction: Convert to a Prediction

Description

Convert object to a Prediction or a list of Prediction.

Usage

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

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

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

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

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", "validation"}. If multiple sets are provided, these are first combined to a single prediction object. Default is "test".

Value

Prediction.