Abstract Prediction ObjectSource:
This is the abstract base class for task objects like PredictionClassif or PredictionRegr.
Prediction objects store the following information:
The row ids of the test set
The corresponding true (observed) response.
The corresponding predicted response.
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.
Converts the data to a
c(..., keep_duplicates = TRUE)
(Prediction, Prediction, ...) -> Prediction
Predictions to a single
FALSEand there are duplicated row ids, the data of the former passed objects get overwritten by the data of the later passed objects.
Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#train-predict
Package mlr3viz for some generic visualizations.
Extension packages for additional task types:
mlr3proba for probabilistic supervised regression and survival analysis.
mlr3cluster for unsupervised clustering.
Internal data structure.
Required type of the Task.
Required properties of the Task.
Set of predict types this object stores.
String in the format
[pkg]::[topic]pointing to a manual page for this object. Defaults to
NA, but can be set by child classes.
Helper for print outputs.
Opens the corresponding help page referenced by field
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.
Note that the
predict_sets of the
measures are ignored by this method,
instead all predictions are used.
Filters the Prediction, keeping only predictions for the provided row_ids. This changes the object in-place, you need to create a clone to preserve the original Prediction.