PredictionData {mlr3}R Documentation

Convert to PredictionData

Description

Objects of type PredictionData serve as a intermediate representation for objects of type Prediction. It is an internal data structure, implemented to optimize runtime and solve some issues emerging while serializing R6 objects. End-users typically do not need to worry about the details, package developers are advised to continue reading for some technical information.

Unlike most other mlr3 objects, PredictionData relies on the S3 class system. The following operations must be supported to extend mlr3 for new task types:

Usage

check_prediction_data(pdata, ...)

is_missing_prediction_data(pdata, ...)

filter_prediction_data(pdata, row_ids, ...)

## S3 method for class 'PredictionDataClassif'
check_prediction_data(pdata, train_task, ...)

## S3 method for class 'PredictionDataClassif'
is_missing_prediction_data(pdata, ...)

## S3 method for class 'PredictionDataClassif'
c(..., keep_duplicates = TRUE)

## S3 method for class 'PredictionDataRegr'
check_prediction_data(pdata, ...)

## S3 method for class 'PredictionDataRegr'
is_missing_prediction_data(pdata, ...)

## S3 method for class 'PredictionDataRegr'
c(..., keep_duplicates = TRUE)

Arguments

pdata

(PredictionData)
Named list inheriting from "PredictionData".

...

(one or more PredictionData objects).

row_ids

integer()
Row indices.

train_task

(Task)
Task used for training the learner.

keep_duplicates

(logical(1)) If TRUE, the combined PredictionData object is filtered for duplicated row ids (starting from last).


[Package mlr3 version 0.20.2 Index]