Learn R Programming

mlr (version 2.13)

Prediction: Prediction object.

Description

Result from predict.WrappedModel. Use as.data.frame to access all information in a convenient format. The function getPredictionProbabilities is useful to access predicted probabilities.

The data member of the object contains always the following columns: id, index numbers of predicted cases from the task, response either a numeric or a factor, the predicted response values, truth, either a numeric or a factor, the true target values. If probabilities were predicted, as many numeric columns as there were classes named prob.classname. If standard errors were predicted, a numeric column named se.

The constructor makePrediction is mainly for internal use.

Object members:

predict.type (character(1))

Type set in setPredictType.

data (data.frame)

See details.

threshold (numeric(1))

Threshold set in predict function.

task.desc (TaskDesc)

Task description object.

time (numeric(1))

Time learner needed to generate predictions.

error (character(1))

Any error messages generated by the learner (default NA_character_).

Internal, do not use!

Usage

makePrediction(task.desc, row.names, id, truth, predict.type,
  predict.threshold = NULL, y, time, error = NA_character_,
  dump = NULL)

Arguments