MAPE - Mean Absolute Percentage Error

Calculates the mean absolute percentage error (Deviation) function for the forecast and the eventual outcomes.

Syntax

MAPE(X, Y, Type)

X
is the eventual outcome time series sample data (a one-dimensional array of cells (e.g., row or column).
Y
is the forecast time series data (a one-dimensional array of cells (e.g., row or column).
Type
is a switch to select the return output (1 = MAPE (default), 2 = Symmetric MAPE (SMAPE)).
Order Description
1 MAPE (default).
2 SMAPE.

Remarks

  1. MAPE is also referred to as MAPD.
  2. The time series is homogeneous or equally spaced.
  3. For a plain MAPE calculation, in the event that an observation value (i.e., $x_k$) is equal to zero, the MAPE function skips that data point.
  4. The mean absolute percentage error (MAPE), also known as mean absolute percentage deviation (MAPD), measures the accuracy of a method for constructing fitted time series values in statistics.
  5. The two-time series must be identical in size.
  6. The mean absolute percentage error (MAPE) is defined as follows: $$\mathrm{MAPE}=\frac{100}{N}\times \sum_{i=1}^N \left | \frac{x_i - \hat x_i}{x_i} \right |$$ Where:
    • $\{x_i\}$ is the actual observations time series.
    • $\{\hat x_i\}$ is the estimated or forecasted time series.
    • $N$ is the number of non-missing data points.
  7. When calculating the average MAPE for a number of time series, you may encounter a problem: a few of the series that has a very high MAPE might distort a comparison between the average MAPE of a time series fitted with one method compared to the average MAPE when using another method.
  8. In order to avoid this problem, other measures have been defined, for example, the SMAPE (symmetrical MAPE), weighted absolute percentage error (WAPE), real aggregated percentage error, and relative measure of accuracy (ROMA).
  9. The symmetrical mean absolute percentage error (SMAPE) is defined as follows: $$\mathrm{SMAPE}=\frac{200}{N}\times \sum_{i=1}^N \frac{\left | x_i - \hat x_i \right |}{\left | x_i\right |+\left | \hat x_i\right |}$$
  10. The SMAPE is easier to work with than MAPE, as it has a lower bound of 0% and an upper bound of 200%.
  11. The SMAPE does not treat over-forecast and under-forecast equally.
  12. For a SMAPE calculation, in the event the sum of the observation and forecast values (i.e., $x_k + \hat x_k$) equals zero, the MAPE function skips that data point.

Files Examples

Related Links

References

Comments

Article is closed for comments.

Was this article helpful?
9 out of 13 found this helpful