Crystal ball

How to calculate sMAPE

  1. Subtract the actual value from the absolute forcast
  2. Square the result
  3. 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.

  1. Install the package: Metrics
  2. Load the library: library (Metrics)
  3. Calculate sMAPE: smape(actual, forecast)
  4. 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top