Description Usage Arguments Value Further Details Examples
View source: R/calcForecastError.R
Generate a vector of row IDs for use in forecast accuracy tests
1 | buildForecastIDs(time_cut, hpi_df, forecast_length = 1, train = TRUE)
|
time_cut |
Period after which to cut off data |
hpi_df |
Data to be converted to training or scoring |
forecast_length |
default = 1; Length of forecasting to do |
train |
Default=TRUE; Create training data? FALSE = Scoring data |
vector of row_ids indicating inclusion in the forecasting data as either the training set (train = TRUE) or the scoring set (train = FALSE)
This function is rarely (if ever) used directly. Most often called by 'calcForecastError()'
It is a generic method that dispatches on the 'hpi_df' object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Load example sales
data(ex_sales)
# Create RT data
rt_data <- rtCreateTrans(trans_df = ex_sales,
prop_id = 'pinx',
trans_id = 'sale_id',
price = 'sale_price',
periodicity = 'monthly',
date = 'sale_date')
# Create ids
fc_ids <- buildForecastIDs(time_cut = 27,
hpi_df = rt_data,
forecast_length = 2,
train = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.