Description Usage Arguments Details Value Author(s) See Also Examples
Computes the fit for all the available forecast combination methods on the provided dataset with respect to the loss criterion. Returns the best fit method.
1 | auto_combine(x, criterion = "RMSE", param_list = NULL)
|
x |
An object of class 'foreccomb'. Contains training set (actual values + matrix of model forecasts) and optionally a test set. |
criterion |
Specifies loss criterion. Set criterion to either 'RMSE' (default), 'MAE', or 'MAPE'. |
param_list |
Can contain additional parameters for the different combination methods (see example below). |
The function auto_combine
allows to quickly apply all the different forecast combination methods onto the provided time series
data and selects the method with the best fit.
The user can choose from 3 different loss criteria for the best-fit evaluation:
root mean square error (criterion='RMSE'
), mean absolute error (criterion='MAE'
), and
mean absolute percentage error (criterion='MAPE'
).
In case the user does not want to optimize over the parameters of some of the combination methods,
auto_combine
allows to specify the parameter values for these methods explicitly (see Examples).
The best-fit results are stored in an object of class 'foreccomb_res', for which separate plot and summary functions are provided.
Returns an object of class foreccomb_res
that represents the results for the best-fit forecast combination method:
Method |
Returns the best-fit forecast combination method. |
Models |
Returns the individual input models that were used for the forecast combinations. |
Weights |
Returns the combination weights obtained by applying the best-fit combination method to the training set. |
Fitted |
Returns the fitted values of the combination method for the training set. |
Accuracy_Train |
Returns range of summary measures of the forecast accuracy for the training set. |
Forecasts_Test |
Returns forecasts produced by the combination method for the test set. Only returned if input included a forecast matrix for the test set. |
Accuracy_Test |
Returns range of summary measures of the forecast accuracy for the test set. Only returned if input included a forecast matrix and a vector of actual values for the test set. |
Input_Data |
Returns the data forwarded to the method. |
Christoph E. Weiss and Gernot R. Roetzer
foreccomb
,
plot.foreccomb_res
,
summary.foreccomb_res
,
accuracy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | obs <- rnorm(100)
preds <- matrix(rnorm(1000, 1), 100, 10)
train_o<-obs[1:80]
train_p<-preds[1:80,]
test_o<-obs[81:100]
test_p<-preds[81:100,]
data<-foreccomb(train_o, train_p, test_o, test_p)
# Evaluating all the forecast combination methods and returning the best.
# If necessary, it uses the built-in automated parameter optimisation methods
# for the different methods.
best_combination<-auto_combine(data, criterion = "MAPE")
# Same as above, but now we restrict the parameter ntop_pred for the method comb_EIG3 to be 3.
param_list<-list()
param_list$comb_EIG3$ntop_pred<-3
best_combination_restricted<-auto_combine(data, criterion = "MAPE", param_list = param_list)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.