add_tsfeatures: Add time series features calculated by the tsfeatures package

View source: R/add-tsfeatures.R

add_tsfeaturesR Documentation

Add time series features calculated by the tsfeatures package

Description

add_tsfeatures() adds a set of calculated features from the tsfeatures package for each time series in the group. These features provide information about various characteristics of the time series.

Usage

add_tsfeatures(.tbl, ..., standardize = TRUE, parallel = FALSE)

Arguments

.tbl

tibble; data with date (class: Date), value (class: numeric), and group (class: character) columns

...

character; one or more unquoted grouping columns

standardize

logical; If TRUE (default), the function with standardize each feature.

parallel

logical; If TRUE, features will be calculated in parallel. Default is FALSE.

Details

Function can be used with a global forecasting method or for EDA. See the tsfeatures website for more details on these features.

Value

The original tibble with 20 additional feature columns.

References

Pablo Montero-Manso, Rob J. Hyndman, Principles and algorithms for forecasting groups of time series: Locality and globality, International Journal of Forecasting, 2021 link

See Also

tsfeatures::tsfeatures()

Examples


library(dplyr, warn.conflicts = FALSE)

group_ts_tbl <- tsbox::ts_tbl(fpp2::arrivals)

head(group_ts_tbl)

new_tbl <- add_tsfeatures(group_ts_tbl, id)

head(new_tbl)

ercbk/ebtools documentation built on Feb. 22, 2025, 1:51 p.m.