Skip to contents

Computes per-series summary features from the target variable via tsfeatures::tsfeatures() and broadcasts them as constant columns to every row of the corresponding series. For an unkeyed task the features are broadcast to every row; for a keyed task each key contributes one feature vector.

Features are cached in the state at train time and reused at predict time. Predicting on a key that was not seen during training is an error.

Parameters

The parameters are the parameters inherited from mlr3pipelines::PipeOpTaskPreproc, as well as:

  • features :: character()
    Function names from the tsfeatures namespace that return numeric feature vectors. Default c("frequency", "stl_features", "entropy", "acf_features").

  • scale :: logical(1)
    If TRUE, scale each series to mean 0 and sd 1 before feature extraction. Default TRUE.

  • trim :: logical(1)
    If TRUE, trim values outside ±trim_amount before feature extraction. Default FALSE.

  • trim_amount :: numeric(1)
    Trimming threshold. Default 0.1.

  • parallel :: logical(1)
    If TRUE, compute features in parallel via a future::plan(). Default FALSE.

  • multiprocess :: function
    Function from the future package used when parallel = TRUE. Default future::multisession().

  • na.action :: function
    Missing-value handler. Default stats::na.pass().

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> PipeOpFcstTsfeats

Methods

Inherited methods


Method new()

Initializes a new instance of this Class.

Usage

PipeOpFcstTsfeats$new(id = "fcst.tsfeats", param_vals = list())

Arguments

id

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

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

PipeOpFcstTsfeats$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
library(mlr3pipelines)
task = tsk("airpassengers")
po = po("fcst.tsfeats", features = c("entropy", "acf_features"))
out = po$train(list(task))[[1L]]
out$head()
} # }