invert: Invert Target Preprocessing

Description Usage Arguments Value

View source: R/inverter.R


Invert the transformation, done on the target column(s) of a data set, after prediction.

Use either a CPORetrafo object with invert capability (see getCPOTrainedCapability, or a CPOInverter retrieved with inverter from a data object that was fed through a retrafo chain.

If a CPORetrafo object is used that contains no target-bound transformations (i.e. has “invert” capability 0), this is a no-op.


invert(inverter, prediction, predict.type = "response")



The retrafo or inverter to apply


[Prediction | matrix | data.frame]
The prediction to invert


The equivalent to the predict.type property of a Learner] object, control what kind of prediction to perform. One of “response”, “se”, “prob”. Default is “response”. Care must be taken that the prediction was generated with a prediction type that fits this, i.e. it must be of type getCPOPredictType(inverter)[predict.type].


[Prediction | data.frame]. A transformed Prediction if a prediction was given, or a data.frame. If the first object in the chain is a CPORetrafo object, the ‘truth’ column(s) of the prediction will be dropped.

mlr-org/mlrCPO documentation built on May 28, 2019, 8:45 a.m.