Description Usage Arguments Value
View source: R/preprocessing.R
Empty values are added when forecasts are generated for future periods (i.e. values are unknown)
1 | add_placeholders(ts_data, fc_horizon, backtesting_opt = NULL)
|
ts_data |
A univariate 'ts' or 'xts' object |
fc_horizon |
An integer, the forecasting horizon (i.e. the number of periods to forecast) |
backtesting_opt |
A list, options which define the backtesting approach: use_bt - A boolean, to determine whether forecasts should be generated on future dates (default) or on past values. Generating forecasts on past dates allows to measure past forecast accuracy and to monitor a statistical model's ability to learn signals from the data. nb_iters - An integer, to determine the number of forecasting operations to apply (When no backtesting is selected, then only one forecasting exercise is performed) method - A string, to determine whether to apply a 'rolling' (default) or a 'moving' forecasting window. When 'rolling' is selected, after each forecasting exercise, the forecasting interval increments by one period and drops the last period to include it in the new training sample. When 'moving' is selected, the forecasting interval increments by its size rather than one period. sample_size - A string, to determine whether the training set size should be 'expanding' (default) or 'fixed'. When 'expanding' is selected, then after each forecasting operation, the periods dropped from the forecasting interval will be added to the training set. When 'fixed' is selected, then adding new periods to the training set will require dropping as many last periods to keep the set's size constant. |
A univariate 'xts' object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.