Differences the target variable with lag lag, producing the new target y'_t = y_t - y_{t - lag}. The first lag
rows are dropped during training. Predictions are inverted via stride-lag cumulative sums anchored at the last
lag training values, yielding original-scale predictions.
Use lag = 1 to remove a trend and lag = 12 (or the seasonal period) to remove seasonality.
Parameters
The parameters are the parameters inherited from mlr3pipelines::PipeOpTargetTrafo, as well as the following:
lag::integer(1)
Lag to difference at. Default1L.
Super classes
mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTargetTrafo -> PipeOpTargetTrafoDifference
Methods
Method new()
Initializes a new instance of this Class.
Usage
PipeOpTargetTrafoDifference$new(id = "fcst.targetdiff", param_vals = list())