Skip to contents

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. Default 1L.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTargetTrafo -> PipeOpTargetTrafoDifference

Methods

Inherited methods


Method new()

Initializes a new instance of this Class.

Usage

PipeOpTargetTrafoDifference$new(id = "fcst.targetdiff", param_vals = list())

Arguments

id

(character(1))
Identifier of resulting object, default "fcst.targetdiff".

param_vals

(named list())
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default list().


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpTargetTrafoDifference$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.