Description Usage Arguments Value Examples
View source: R/POST_FORECAST_get_best_forecast_methods.R
get_best_forecast_methods
is a function to determine the n best
forecast methods from an (ordered) accuracy overview, when evaluating for a
specific minimum and maximum number of periods ahead forecast horizon. This
is determined separately for every grouping available within the accuracy
overview.
1 2 3 4 5 6 7 | get_best_forecast_methods(
accuracy_overview,
n = 1,
min_periods_ahead = 1,
max_periods_ahead = Inf,
filter_incomplete_fc = TRUE
)
|
accuracy_overview |
A tibble containing an overview of the overall forecast accuracy of each forecast model in the main_forecasting_table. |
n |
A positive integer value indicating the number of best forecast methods to be returned. |
min_periods_ahead |
A positive integer value indicating the minimum number of periods ahead to be used as forecast horizon for evaluating the forecast performance. |
max_periods_ahead |
A positive integer value indicating the maximum number of periods ahead to be used as forecast horizon for evaluating the forecast performance. |
filter_incomplete_fc |
Boolean, which is set to TRUE if all incomplete forecasts (which did run successfully for one or more split dates for a specific group) should be filtered before calculation, or set to FALSE if they should not be filtered. |
A tibble with an overview of the n best forecast methods for each grouping.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | accuracy_overview <- tstools::initialize_ts_forecast_data(
data = dummy_gasprice,
date_col = "year_month",
col_of_interest = "gasprice",
group_cols = c("state", "oil_company")
) %>%
create_main_forecasting_table(
seasonal_periods = c(12,3),
min_train_periods = 150
) %>%
add_fc_models_to_main_forecasting_table(
periods_ahead = 12,
fc_methods = c("basic", "linear")
) %>%
get_forecast_accuracy_overview()
get_best_forecast_methods(accuracy_overview)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.