This is the abstract base class for task objects like PredictionClassif or PredictionRegr.

Prediction objects store the following information:

1. The row ids of the test set

2. The corresponding true (observed) response.

3. The corresponding predicted response.

4. Additional predictions based on the class and predict_type. E.g., the class probabilities for classification or the estimated standard error for regression.

Note that this object is usually constructed via a derived classes, e.g. PredictionClassif or PredictionRegr.

## S3 Methods

• as.data.table(rr)
Prediction -> data.table::data.table()
Converts the data to a data.table::data.table().

• c(..., keep_duplicates = TRUE)
(Prediction, Prediction, ...) -> Prediction
Combines multiple Predictions to a single Prediction. If keep_duplicates is FALSE and there are duplicated row ids, the data of the former passed objects get overwritten by the data of the later passed objects.

Other Prediction: PredictionClassif, PredictionRegr

## Public fields

data

(named list())
Internal data structure.

task_type

(character(1))

task_properties

(character())

predict_types

(character())
Set of predict types this object stores.

man

(character(1))
String in the format [pkg]::[topic] pointing to a manual page for this object. Defaults to NA, but can be set by child classes.

## Active bindings

row_ids

(integer())
Vector of row ids for which predictions are stored.

truth

(any)
True (observed) outcome.

missing

(integer())
Returns row_ids for which the predictions are missing or incomplete.

## Methods

### Method format()

Helper for print outputs.

### Arguments

...

(ignored).

### Method score()

Calculates the performance for all provided measures Task and Learner may be NULL for most measures, but some measures need to extract information from these objects.

### Arguments

deep

Whether to make a deep clone.