View source: R/add-tsfeatures.R
add_tsfeatures | R Documentation |
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.
add_tsfeatures(.tbl, ..., standardize = TRUE, parallel = FALSE)
.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. |
Function can be used with a global forecasting method or for EDA. See the tsfeatures website for more details on these features.
The original tibble with 20 additional feature columns.
Pablo Montero-Manso, Rob J. Hyndman, Principles and algorithms for forecasting groups of time series: Locality and globality, International Journal of Forecasting, 2021 link
tsfeatures::tsfeatures()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.