Skip to contents

mlr3pipelines::Selector that selects lag features created by PipeOpFcstLags. Matches features named {target}_lag_{i} where {target} is the task's target variable.

Usage

selector_fcst_lags()

Value

function: A mlr3pipelines::Selector function.

See also

Other Selectors: selector_fcst_rolling()

Examples

library(mlr3pipelines)
task = tsk("airpassengers")
pop = po("fcst.lags", lags = 1:3)
new_task = pop$train(list(task))[[1L]]
selector_fcst_lags()(new_task)
#> [1] "passengers_lag_1" "passengers_lag_2" "passengers_lag_3"