Compute Symmetric Mean Absolute Percentage Error (SMAPE), Mean Absolute Scaled Error (MASE), and Root Mean Squared Error (RMSE) from forecasted and validation data.
smape(forecast, validation)
mase(forecast, validation)
rmse(forecast, validation)A numeric vector of predicted or forecasted values. Its length must be the same as the
length of the validation argument.
A numeric vector of actual (real) values being forecasted. Its length must be the same as the
length of the forecast argument.
A numeric value.
The function compute various error measures of the forecasts.
Let \(v_i\), \(f_i\) be the \(i\)-th elements of
validation or forecast, respectively, and
\(n\) be the length of validation. Then:
\(SMAPE = 1/n \sum_{i=1}^n (2 |f_i - v_i|) / (|f_i| + |v_i|)\)
\(MASE = (\sum_{i=1}^n |v_i - f_i|) / (n/(n-1) * \sum_{i=2}^n |v_i - v_{i-1}|)\)
\(RMSE = sqrt(1/n * \sum_{i=1}^n (v_i - f_i)^2)\)