logo

Mean Absolute Percentage Error MAPE 📂Data Science

Mean Absolute Percentage Error MAPE

Definition 1

In a regression problem, for a data point {xk}k=1n\left\{ x_{k} \right\}_{k=1}^{n} and its prediction {x^k}k=1n\left\{ \widehat{x}_{k} \right\}_{k=1}^{n}, the Mean Absolute Percentage Error is defined as follows. MAPE=1nk=1nxkx^kxk \text{MAPE} = {{ 1 } \over { n }} \sum_{k=1}^{n} \left| {{ x_{k} - \widehat{x}_{k} } \over { x_{k} }} \right|

Explanation

Advantages

MAPE provides a highly intuitive interpretation because it explains how well the predictions describe the data in percentage terms, alongside its simple and straightforward computation. Like the multivariate regression coefficient R2R^{2}, it is an indicator that can be evaluated absolutely regardless of the scale of the data.

For example, if the MSE of a model is 10210^{-2}, merely observing this value does not allow you to infer the model’s performance. If the data scale is about 10310^{3}, it would be highly accurate, but if the scale is 10610^{-6}, the model fails to describe the data at all. However, MAPE conveys performance in easily understood percentages such as 85% or 99%, independent of the data scale.

Disadvantages

If xk=0x_{k} = 0 exists, MAPE diverges to infinity. This stems from an inherent flaw in the formula, presenting a significant weakness as an evaluation metric due to the potential for numerical issues, irrespective of accuracy.

Of course, avoiding xk=0x_{k} = 0 in practice is not a panacea. Even if not exactly 00, values approaching 00, typically considered to be smaller than 11, can sufficiently cause issues.

Another drawback of MAPE, not frequently mentioned but experienced in practical scenarios, is that MAPE is actually not bounded by [0,1][0,1], meaning that absurd predictions can cause the absolute percentage error to exceed 11:

  • Opposite sign case: For a true value 55, if the prediction is 5-5, then the APE becomes as follows: 2>12 > 1. APE=5(5)5=2 \text{APE} = \left| {\frac{ 5 - (-5) }{ 5 }} \right| = 2
  • Grossly incorrect case: For a true value 1010, if the prediction is 100100, then the APE becomes as follows: 9>19 > 1. APE=1010010=9 \text{APE} = \left| {\frac{ 10 - 100 }{ 10 }} \right| = 9

See Also


  1. Kim, S., & Kim, H. (2016). A new metric of absolute percentage error for intermittent demand forecasts. International Journal of Forecasting, 32(3), 669-679. https://doi.org/10.1016/j.ijforecast.2015.12.003 ↩︎