What is Mean Absolute Percentage Error (MAPE)?
Mean Absolute Percentage Error (MAPE) measures the average absolute prediction error as a percentage of the actual value. It is commonly used to evaluate regression and forecasting models.
Formula
MAPE = (100 / n) × Σ |(yi - ŷi) / yi|where:
yiis the actual valueŷiis the predicted valuenis the number of observations
The formula requires nonzero actual values.
Example
Suppose a model predicts monthly sales:
- Actual:
100, Predicted:90→ absolute percentage error =10% - Actual:
200, Predicted:220→ absolute percentage error =10%
MAPE = (10% + 10%) / 2 = 10%So the model's absolute prediction error averages 10% of the actual values.
Why use MAPE?
- Easy to communicate: results are expressed as percentages.
- Independent of the target's units: unlike MAE, its value is not in rupees, kilograms, or another unit.
- Useful for forecasting: it can be intuitive when actual values are positive and comfortably away from zero.
Important limitation
MAPE is undefined when an actual value is zero and can become extremely large when actual values are close to zero. Its percentage interpretation can also be problematic for negative targets.
For that reason, check the target values before choosing MAPE. The next article explores when this metric can be misleading.
In short, MAPE expresses the average absolute regression error as a percentage of actual values, making results intuitive when actual values are positive and nonzero.
Learning Sequence
Machine Learning Curriculum
Explore Related Questions
Deepen your understanding across related Machine Learning topics.