Description Usage Arguments Details Value References See Also Examples
View source: R/thief_ensemble.R
This function fits ensemble univariate forecast models on all levels of temporal aggregation for a multivariate xts timeseries object
1 2 3 4 5 6 7 8 9 10  | thief_ensemble(
  y,
  k = 1,
  lambda = NULL,
  frequency = 52,
  horizon = NULL,
  cores = parallel::detectCores() - 1,
  max_agg = NULL,
  discrete = FALSE
)
 | 
y | 
 
  | 
k | 
 
  | 
lambda | 
 
  | 
frequency | 
 
  | 
horizon | 
 
  | 
cores | 
 
  | 
max_agg | 
 (optional)   | 
discrete | 
 
  | 
Series in y are aggregated at all possible levels up to annual using tsaggregates.
ensemble_base is used on all levels of aggregation to find a weighted ensemble of six
univariate forecast models that minimises mean absolute scaled error. Forecasts are then reconciled
using reconcilethief and are optionally constrained using non-negative optimisation if there are no
negative values in y. Adjustments to the original unaggregated forecast are incorporated and a distribution of 1000 sample
paths for each series' forecast are returned
A list containing the reconciled forecast distributions for each series in y. Each element in
the list is a horizon x 1000 matrix of forecast predictions
Athanasopoulos, G., Hyndman, R., Kourentzes, N., and Petropoulos, F. Forecasting with temporal hierarchies. (2017) European Journal of Operational Research 262(1) 60–74
ensemble_base, forecast,
reconcilethief
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | library(mvforecast)
data("ixodes_vets_dat")
#Fit a thief_ensemble model
mod1 <- thief_ensemble(y = ixodes_vets_dat$y_train,
frequency = 52, lambda = 1, k = 1,
cores = parallel::detectCores() - 1)
#Calculate the out-of-sample CRPS
calc_crps(mod1, y_test = ixodes_vets_dat$y_test)
Plot simulation results for one of the plots in the NEON dataset
plot_mvforecast(simulation = mod1[[4]])
points(as.vector(ixodes_vets_dat$y_test[,4]))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.