invert {mlrCPO}R Documentation

Invert Target Preprocessing

Description

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.

Usage

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

Arguments

inverter

[CPOInverter]
The retrafo or inverter to apply

prediction

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

predict.type

[character(1)]
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].

Value

[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.


[Package mlrCPO version 0.3.7-7 Index]