PredictionRegr: Prediction Object for Regression

Description Format Construction Fields See Also Examples

Description

This object wraps the predictions returned by a learner of class LearnerRegr, i.e. the predicted response and standard error.

Format

R6::R6Class object inheriting from Prediction.

Construction

1
p = PredictionRegr$new(task = NULL, row_ids = task$row_ids, truth = task$truth(), response = NULL, se = NULL)

Fields

All fields from Prediction, and additionally:

The field task_type is set to "regr".

See Also

Other Prediction: PredictionClassif, Prediction

Examples

1
2
3
4
5
task = tsk("boston_housing")
learner = lrn("regr.featureless", predict_type = "se")
p = learner$train(task)$predict(task)
p$predict_types
head(as.data.table(p))

mllg/mlr3 documentation built on Sept. 27, 2019, 9:38 a.m.