PredictionRegr

0th

Percentile

Prediction Object for Regression

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

Keywords
datasets
Note

It is possible to initialize this object without any arguments. This allows to manually construct Prediction objects in a piecemeal fashion. Required are "row_ids", "truth", and "predict_type". Depending on the value of predict_types, response and se must also be set.

Format

R6::R6Class object inheriting from Prediction.

Construction

p = PredictionRegr$new(row_ids, truth, response = NULL, se = NULL)
  • row_ids :: (integer() | character()) Row ids of the observations in the test set.

  • truth :: numeric() True (observed) response.

  • response :: numeric() Vector of numeric response values. One element for each observation in the test set.

  • se :: numeric() Numeric vector of predicted standard error. One element for each observation in the test set.

Fields

All fields from Prediction, and additionally:

  • response :: numeric() Access to the stored predicted response.

  • se :: numeric() Access to the stored standard error.

The field task_type is set to "regr".

See Also

Other Prediction: PredictionClassif, Prediction

Aliases
  • PredictionRegr
Examples
# NOT RUN {
task = mlr_tasks$get("boston_housing")
learner = mlr_learners$get("regr.featureless")
learner$predict_type = "se"
p = learner$train(task)$predict(task)
p$predict_types
head(as.data.table(p))
# }
Documentation reproduced from package mlr3, version 0.1.0-9000, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.