Description Usage Arguments Value Examples
View source: R/HELPER_add_fc_values_all_split_dates.R
add_fc_values_all_split_dates
is a wrapper function, that adds previously
computed hierarchical forecasts into the main forecasting table.
1 2 3 4 5 | add_fc_values_all_split_dates(
main_forecasting_table,
model_types = c("consistent", "bottom-up"),
best_model_per_group
)
|
main_forecasting_table |
A tibble object that contains run forecasts for
all split dates and all groups. It is assumed that this is the output of the
|
best_model_per_group |
A tibble that contains the best fc_model for
each group. It is assumed that this tibble is created using the
|
A tibble with the consistent hierarchical forecast value for all groups in all forecast dates, at the specified forecast split date
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | main_forecasting_table <- dummy_hierarchical_gasprice %>%
dplyr::filter(oil_company == "CompanyA") %>%
tstools::initialize_ts_forecast_data(
date_col = "year_month",
col_of_interest = "gasprice",
group_cols = "currency",
hierarchical_cols = c("location")
) %>%
dplyr::filter(period >= as.Date("2004-06-30")) %>%
create_main_forecasting_table() %>%
add_fc_models_to_main_forecasting_table(
fc_methods = c("basic", "linear")
)
best_model_per_group <- main_forecasting_table %>%
get_forecast_accuracy_overview() %>%
get_best_forecast_methods()
add_fc_values_all_split_dates(
main_forecasting_table = main_forecasting_table,
model_types = c("consistent", "bottom-up"),
best_model_per_group = best_model_per_group
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.