get_ts_features: Extract time series features

Description Usage Arguments Value Examples

View source: R/HELPER_get_ts_features.R

Description

get_ts_features gets a time series object and extracts multiple features from it.

Usage

1
get_ts_features(ts_object)

Arguments

ts_object

A time series object. It is assumed to have been the outcome of a process from initializing the original dataset with initialize_ts_forecast_data from tstools and eventually into ts_object_train in create_main_forecasting_table.

Value

A tibble that has 60 features of the input. See Hyndman's tsfeatures package vignette for information on the features themselves

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ts_object <- dummy_gasprice %>%
      tstools::initialize_ts_forecast_data(
      date_col = "year_month",
      col_of_interest = "gasprice",
      group_cols = c("oil_company", "state"),
      xreg_cols = c("gemprice")
   ) %>%
   create_main_forecasting_table(
      min_train_periods = 25
   ) %>%
   dplyr::slice(1:1) %>%
   dplyr::pull(ts_object_train)
get_ts_features(ts_object)

ing-bank/tsforecast documentation built on Sept. 18, 2020, 9:40 a.m.