predict_baseline_fast | R Documentation |
This function has the same purpose as the predict_baseline() function but uses only the models which computation time are the smallest.
predict_baseline_fast(sales_data, frequency = 52, start = c(2014, 1), forecast_horizon = 52, size.te.set = 52, promo_done = FALSE, criterion = "accuracy", sizeroll = 11)
sales_data |
A vector containing historical sales data. |
frequency |
A numerical value specifying the frequency of the seasonality. |
start |
A vector of length 2 with the date of the first observation. It contains first the year and then the day/week/month according to your data. |
forecast_horizon |
An integer value specifying the number of observations to forecast. |
size.te.set |
An integer value specifying the size of the testing set. |
promo_done |
A logical variable specifying if promotions are done for the product. |
criterion |
A string variable specifying the selection criterion that should be used to select the model ("ME", "RMSE", "MAE", "MPE", "MAPE", "MASE", "ACF1", "Theil's U"). "accuracy" can also be used to reflect the needs of the company. |
sizeroll |
The window of the moving average or moving median when using the baseline() function. |
smoother |
The smoother that should be considered when using the baseline() function. It can be "mean", "median" or "loess". |
A list containing the select model, the associated graphs, the predictions and the confidence intervals, the accuracy measures and the same elements for all other considered models.
Grandadam Patrik
data("mydata") my_baseline <- predict_baseline_baseline(mydata, promo_done = TRUE, criterion = "MAPE") my_baseline$selected_model$PLOT # the plot of the selected model my_baseline$selected_model$FORECAST # the forecast of the selected model my_baseline$selected_model$ACCURACIES # the accuracies of the selected model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.