Description Usage Arguments Value Examples
View source: R/META_prepare_fforma_training_data.R
prepare_fforma_training_data
is function to prepare a set of training
data for the FFORMA meta model, based on a main_forecasting_table. From each
row of the main_forecasting_table the ts_object_train is used to generate a
set of time series features (using the get_ts_features
function),
while the fc_errors from that same row are used to determine the
best_fc_model. The best_fc_model will be used as the label when training the
FFORMA meta model.
1 | prepare_fforma_training_data(main_forecasting_table)
|
main_forecasting_table |
A tibble containing a single row and several
columns of data required for time series forecasting, which has been
created using the |
A tibble that contains the ts_object_train, grouping and ts_split_date columns from the input main_forecasting_table. An additional column that gives the name of the best forecast model (based on MASE) is also included.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | main_forecasting_table <- dummy_gasprice %>%
tstools::initialize_ts_forecast_data(
date_col = "year_month",
col_of_interest = "gasprice",
group_cols = c("state", "oil_company")
) %>%
create_main_forecasting_table(
seasonal_periods = NULL,
min_train_periods = 188
) %>%
add_fc_models_to_main_forecasting_table(
fc_methods = c("basic", "linear")
)
prepare_fforma_training_data(main_forecasting_table)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.