Description Usage Arguments Value Examples
View source: R/VISUALIZE_compare_forecast_performance_per_group.R
compare_forecast_performance_per_group
is a function to create a plot
which compares the forecast performance of a single forecast model for every
available group, based on a selected performance summary variable. For demo
purposes, sensitive figures can be hidden from the audience.
1 2 3 4 5 | compare_forecast_performance_per_group(
accuracy_overview,
fc_model = "",
demo_mode = FALSE
)
|
accuracy_overview |
A tibble containing an overview of the overall forecast accuracy for each group in the main_forecasting_table, limited to data for a single forecast model. |
fc_model |
A character string specifying which forecast model to compare accross the available groups. |
demo_mode |
Boolean, which is to be set to TRUE if any potentially sensitive figures should be hidden from the audience for demo purposes, or set to FALSE if all figures can safely be displayed. |
A plotly object displaying performance per forecast model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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(
min_train_periods = 180
) %>%
add_fc_models_to_main_forecasting_table(
periods_ahead = 12,
fc_methods = c("linear")
) %>%
get_forecast_accuracy_overview()
compare_forecast_performance_per_group(
accuracy_overview = accuracy_overview,
fc_model = "fc_linear_trend_seasonal"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.