Description Usage Arguments Value Cross validation settings Examples
Time-series cross-validation wrapper for auto.arima
| 1 2 3 4 5 6 7 8 9 10 | 
| data | data.table object | 
| cv_setting | cross validation settings. Named list requiring  | 
| col_id | Optional ID column in  | 
| col_date | Date column in  | 
| col_value | Value column in  | 
| transform | Transform data before estimation? One of NULL (default) and "normalize" | 
| frequency | time series frequency, e.g. 4 for quarters and 12 for months | 
| h | NULL if forecast horizon equals cv_setting$n_test, else named list of forecast horizons for accuracy measures | 
list of type (model), h (forecast horizon, if specified),
mape, smape, mase, smis and acd
Using rolling_origin to split the time series. Requiring:
periods_train: Length of training set per split
periods_val: Length of validation set per split
periods_test: Length of test/hold-out set per split
skip_span: Gaps between overlapping splits to reduce computational
intensity and recundancy between data splits.
 
Note: periods_val only relevant for deep learning models.
cv_baselines and cv_arima use sum of periods_train and
periods_val for training and only periods_test as hold-out test set (no
learning and feedback through validation by traditional statistical models)
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run: 
cv_setting <- list(
  periods_train = 90,
  periods_val = 10,
  periods_test = 10,
  skip_span = 5
)
fc_01 <- cv_arima(
  data = tsRNN::DT_apple,
  cv_setting = cv_setting
)
fc_01
# Multiple forecast horizons
fc_02 <- cv_arima(
  data = tsRNN::DT_apple,
  cv_setting = cv_setting,
  h = list(short = 1:2, long = 3:6)
)
fc_02
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.