Mean absolute percentage error
Mean absolute percentage error is the average absolute prediction error divided by the corresponding actual value, expressed as a percentage.
Outlier Detection in Python
Mean absolute percentage error is the average absolute forecast error expressed as a proportion of the corresponding actual value.
- How it is used
- Uses forecast error percentages to assess time-series accuracy and identify unusually inaccurate points as possible outliers.
- How deep it goes
- Defines the metric, interprets its percentage, implements its formula, and limits outlier use to reasonably strong forecasts.
- Examples
- Uses synthetic daily data, 60-day forecasts, a 14% interpretation, and a deliberately increased value producing a large forecast error.
- What you can do after
- Evaluate forecast accuracy and compare models with a NumPy MAPE calculation, then inspect large errors for possible outliers.
Read how Outlier Detection in Python explains mean absolute percentage error →
Machine Learning System Design
The average absolute prediction error expressed as a percentage of the corresponding actual values.
- How it is used
- Screens percentage-based forecast error, but rejects it for zero-valued count data in supply-chain planning.
- How deep it goes
- Defines MAPE through its zero-denominator failure and contrasts alternatives, without deriving or implementing the metric.
- Examples
- Uses future count-data realizations, including zero-demand periods, to expose MAPE’s undefined result.
- What you can do after
- Evaluate forecast metrics by checking whether future actuals can be zero before selecting MAPE.
Read how Machine Learning System Design explains mean absolute percentage error →
Demand Forecasting Best Practices
Mean absolute percentage error is the average across periods of absolute forecast error divided by the corresponding actual demand.
- How it is used
- Measures forecast accuracy as an average percentage error, but should not guide forecasting decisions because it can encourage under-forecasting.
- How deep it goes
- Defines the period-level formula, works through a four-period calculation, and explains weighting flaws, zero-demand failure, and forecast asymmetry.
- Examples
- Uses a four-period demand-and-forecast table, Excel APE formulas, extreme demand, and intermittent demand containing zeros.
- What you can do after
- Apply it via Excel by calculating abs(f−d)/d for each period and averaging the resulting absolute percentage errors.
Read how Demand Forecasting Best Practices explains mean absolute percentage error →
Related concepts
- metrickind of · A metric is a quantitative measure used to characterize or assess a property, condition, behavior, performance, or outcome.
- count datacontrasts with · Count data consist of nonnegative integer-valued observations representing numbers of events, items, or occurrences.
- intermittent demandcontrasts with · Intermittent demand is demand occurring sporadically, with periods of zero or little demand between nonzero occurrences.
- forecast accuracymeasures · Forecast accuracy is the degree to which forecast values agree with the corresponding actual demand values.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


