baselines: Forecast with baseline models

Description Usage Arguments Value Examples

View source: R/baselines.R

Description

Get forecast results for the following simple forecasting methods:

Usage

1
baselines(data, test_size = NULL, acc_measure)

Arguments

data

Univariate time series (ts object)

test_size

Numeric vector of length one specifying length of test set (along with forecasting horizon). NULL by default which yield 2 times the frequency of the time series

acc_measure

Accuracy indicator. Valid options are "ME", "RMSE", "MAE", "MPE", "MAPE", "MASE" and "ACF1"

Value

list of forecasting methods with data.frame for accuracy indicators

Examples

1
2
3
4
5
6
# Calculate MAE and RMSE of simple forecasting models for Apple FCF
apple <- tsRNN::ts_apple
baselines(apple, acc_measure = c("MAE", "RMSE"))

# Change forecast horizon to 4 years
baselines(apple, test_size = 16, acc_measure = c("MAE", "RMSE"))

thfuchs/tsRNN documentation built on April 17, 2021, 11:03 p.m.