View source: R/combine_models.R
combine_models | R Documentation |
This function combines the three separate forecasts for the low, mid and high frequency model. The three separate forecasts need to be run first.
combine_models(
longterm_predictions,
midterm_predictions,
shortterm_predictions,
longterm_model_number = 1,
data_directory = tempdir(),
verbose = FALSE
)
longterm_predictions |
Dataframe. The object resulting from function |
midterm_predictions |
Dataframe. The object resulting from function |
shortterm_predictions |
Dataframe. The object resulting from function |
longterm_model_number |
Integer. Specifies which of the 3 best long-term models should be used. |
data_directory |
The path to the directory where the results, metrics and plots will be saved. The default is set to a temporary directory. |
verbose |
A boolean value indicating if you want the generated plots and final result metrics to be shown (set to TRUE if yes). |
A list with the dataframe with the combined model results. A dataframe with selected model metrics. And a list with the plotted results. The combined model predictions, plots, and metrics are saved in the respective folder for the country.
A dataframe with the combined model results.
A dataframe with model metrics.
A list with the plot for the full timeseries, a plot with two sample weeks, and a stacked plot with both.
example_full_model_predictions <- combine_models(example_longterm_predictions,
example_midterm_predictions, example_shortterm_predictions,
longterm_model_number = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.