LoslegenKostenlos loslegen

Ensembling of Forecasts

Now that you have two forecasts (your regression and your time series) we can ensemble their forecasts to see if that helps the forecasts. Your two forecasts are saved as for_MET_hi_xts and pred_MET_hi_xts in your workspace as well as the validation data set MET_hi_v.

Diese Übung ist Teil des Kurses

Forecasting Product Demand in R

Kurs anzeigen

Anleitung zur Übung

  • Ensemble your two forecasts by taking the average of the two forecasts.
  • Calculate the MAE and MAPE of this new ensemble forecast.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Ensemble the two forecasts together
for_MET_hi_en <- ___

# Calculate the MAE and MAPE
MAE <- mean(abs(___ - MET_hi_v))
print(MAE)

MAPE <- 100*mean(abs((___ - MET_hi_v)/MET_hi_v))
print(MAPE)
Code bearbeiten und ausführen