as_prediction: Convert to a Prediction

Description Usage Arguments Value

View source: R/as_prediction.R

Description

Convert object to a Prediction or a list of Prediction.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
as_prediction(x, check = TRUE, ...)

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

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

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

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


mlr3 documentation built on Aug. 6, 2021, 1:07 a.m.