logo

Mean Absolute Percentage Error MAPE 📂Data Science

Mean Absolute Percentage Error MAPE

Definition 1

In a regression problem, for a data point $\left\{ x_{k} \right\}_{k=1}^{n}$ and its prediction $\left\{ \widehat{x}_{k} \right\}_{k=1}^{n}$, the Mean Absolute Percentage Error is defined as follows. $$ \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 $R^{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 $10^{-2}$, merely observing this value does not allow you to infer the model’s performance. If the data scale is about $10^{3}$, it would be highly accurate, but if the scale is $10^{-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 $x_{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 $x_{k} = 0$ in practice is not a panacea. Even if not exactly $0$, values approaching $0$, typically considered to be smaller than $1$, 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]$, meaning that absurd predictions can cause the absolute percentage error to exceed $1$:

  • Opposite sign case: For a true value $5$, if the prediction is $-5$, then the APE becomes as follows: $2 > 1$. $$ \text{APE} = \left| {\frac{ 5 - (-5) }{ 5 }} \right| = 2 $$
  • Grossly incorrect case: For a true value $10$, if the prediction is $100$, then the APE becomes as follows: $9 > 1$. $$ \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 ↩︎