Function calculates several error measures using the provided forecasts and the data for the holdout sample.
measures(holdout, forecast, actual, digits = NULL, benchmark = c("naive",
"mean"))
The functions returns the named vector of errors:
ME,
MAE,
MSE
MPE,
MAPE,
MASE,
sMAE,
RMSSE,
sMSE,
sCE,
rMAE,
rRMSE,
rAME,
asymmetry,
sPIS.
For the details on these errors, see Errors.
The vector of the holdout values.
The vector of forecasts produced by a model.
The vector of actual in-sample values.
Number of digits of the output. If NULL
then no rounding is done.
The character variable, defining what to use as
benchmark for relative measures. Can be either "naive"
or
"mean"
(arithmetic mean of the whole series. The latter
can be useful when dealing with intermittent data.
Ivan Svetunkov, ivan@svetunkov.ru
Svetunkov, I. (2017). Naughty APEs and the quest for the holy grail. https://openforecast.org/2017/07/29/naughty-apes-and-the-quest-for-the-holy-grail/
Fildes R. (1992). The evaluation of extrapolative forecasting methods. International Journal of Forecasting, 8, pp.81-98.
Hyndman R.J., Koehler A.B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22, pp.679-688.
Petropoulos F., Kourentzes N. (2015). Forecast combinations for intermittent demand. Journal of the Operational Research Society, 66, pp.914-924.
Wallstrom P., Segerstedt A. (2010). Evaluation of forecasting error measurements and techniques for intermittent demand. International Journal of Production Economics, 128, pp.625-636.
Davydenko, A., Fildes, R. (2013). Measuring Forecasting Accuracy: The Case Of Judgmental Adjustments To Sku-Level Demand Forecasts. International Journal of Forecasting, 29(3), 510-522. tools:::Rd_expr_doi("10.1016/j.ijforecast.2012.09.002")
y <- rnorm(100,10,2)
ourForecast <- rep(mean(y[1:90]),10)
measures(y[91:100],ourForecast,y[1:90],digits=5)
Run the code above in your browser using DataLab