Classical ML, validation, metrics, interpretation, debugging · insight-0143
Retire MAPE when actuals can be zero or near zero
- Evidence type
- documented fact
- Difficulty
- easy
- Roles
- Data scientist, Data analyst
- Industries
- retail, logistics
Summary: situation, action, reason, boundary
Situation
You evaluate demand, sales or bookings where some actuals are zero or tiny, for example small routes or slow SKUs.
Action
Use WAPE (sum of absolute errors over sum of actuals), MAE or MASE, and report errors by volume band.
Reason
Percentage error divides by the actual, so it explodes as actuals approach zero and its distribution becomes extremely skewed.
Boundary
Intermittent demand, low-volume segments, revenue with refunds and any target that can be zero.
Symptom or risk
A few near-zero actuals produce enormous percentage errors that dominate the average; the metric is undefined at zero.
Exceptions
MAPE is acceptable when all actuals are well away from zero and stakeholders need a percentage.
Trade-offs
WAPE is volume-weighted, so large items dominate it; scaled errors like MASE need a sensible benchmark.
Pitfalls
Relying on a library epsilon in the denominator; scikit-learn divides by max(epsilon, |y|), which avoids division by zero but still yields huge errors.
Lessons and concepts
Claims and their sources
Percentage errors are infinite or undefined when actuals are zero and have skewed distributions when actuals are close to zero; scaled errors such as MASE avoid this.
scikit-learn's MAPE divides each absolute error by max(epsilon, |y|).