
How to calculate sMAPE
- Subtract the actual value from the absolute forcast
- Square the result
- Find the square root of the previous result (step #2)
sMAPE = Square Root ( F – A)^2
In general when comparing forecast methods, the smaller the sMAPE the better.
How to calculate sMAPE in r
Use the Metrics Package.
Assume you have your variable vectors set up as “actual” for the actual values and “forecast” for the forecasted values. Note you must have the same number of values in each vector.
- Install the package: Metrics
- Load the library: library (Metrics)
- Calculate sMAPE: smape(actual, forecast)
- the result will be stated as a percentage though no % symbol is printed, e.g. [1] 9.921348 which would be 9.92% rounded to two places.