# 平均绝对百分比误差

平均绝对百分比误差（MAPE）是一种衡量预测准确度的指标，定义为预测值与实际值之差的绝对值，各自除以实际值并以百分比表示后的平均值。对于由 n 个标量观测值构成的预测数组 F 和实际数组 A，其公式为

\[ E = \frac{1}{n} \sum_{i=1}^{n} \left| \frac{A_i - F_i}{A_i} \right| \times 100 \]

其中求和沿指定维度进行<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup>。由于每个误差都以实际值进行缩放，MAPE 是无量纲的，这使得可以在不同尺度的序列之间比较准确度，而且它易于解释和传达<sup>[2](https://www.sciencedirect.com/science/article/pii/S0169207016000121)</sup><sup> • </sup><sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。多项调查表明，它是企业和组织中使用最广泛的预测准确度指标<sup>[4](https://arxiv.org/abs/2105.05249)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | \( \mathrm{MAPE} = \frac{1}{n} \sum_{i=1}^{n} \lvert (A_i - F_i)/A_i \rvert \times 100 \)<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup> |
| 尺度特性 | 无量纲且与尺度无关，因此可在不同数量级的序列之间进行比较<sup>[2](https://www.sciencedirect.com/science/article/pii/S0169207016000121)</sup><sup> • </sup><sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup> |
| 实际值为零 | 当实际值为零时无定义；较小的非零实际值会产生任意大的数值<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup><sup> • </sup><sup>[5](https://scikit-learn.org/1.5/modules/generated/sklearn.metrics.mean_absolute_percentage_error.html)</sup> |
| 不对称性 | 对高于实际值的预测的惩罚重于低于实际值的预测；低预测的百分比误差以 100% 为界，而高预测的误差没有上界<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup> |
| 竞赛历史 | 1982 年 M 竞赛中的主要准确度指标<sup>[6](https://robjhyndman.com/papers/mase.pdf)</sup>；M3 竞赛则改用对称 MAPE、中位数对称 APE 及相关指标<sup>[7](https://www.sciencedirect.com/science/article/pii/S0169207000000571)</sup> |
| 建议的替代指标 | 海因德曼（Hyndman）与科勒（Koehler）（2006）提出了平均绝对缩放误差（MASE），作为一种普遍适用且不存在这些问题的指标<sup>[8](https://w.robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/)</sup><sup> • </sup><sup>[9](https://robjhyndman.com/papers/foresight.pdf)</sup> |
| 回归等价性 | 在 MAPE 下寻找最佳模型等价于进行加权平均绝对误差（MAE）回归<sup>[10](https://arxiv.org/abs/1506.04176)</sup> |

## 定义与变体

MAPE 对每个观测值的绝对百分比误差（APE）取平均，其中单点的 APE 为绝对预测误差除以实际值<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup>。加权形式为每个观测值赋予权重 \( W_i \)：

\[ E_W = \frac{\sum_{i=1}^{n} W_i \left| \frac{A_i - F_i}{A_i} \right| \times 100}{\sum_{i=1}^{n} W_i} \]

从而使某些时期或产品在汇总中比其他时期或产品占更大比重<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup>。不同软件实现的约定有所不同：scikit-learn 的 `mean_absolute_percentage_error` 返回 \( \lvert y_{\text{true}} - y_{\text{pred}} \rvert / \lvert y_{\text{true}} \rvert \) 的均值，不含 100 这个因子，因此值 1 对应 100%，且当真实值为零时返回一个很大的有限值而非无穷大<sup>[5](https://scikit-learn.org/1.5/modules/generated/sklearn.metrics.mean_absolute_percentage_error.html)</sup>。MATLAB 的 `mape` 包含 100 这个因子，并提供 `"omitzero"` 选项以跳过实际值为零的观测<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup>。

## 为何被广泛使用

在众多时间序列之间比较预测方法，需要一个不依赖于数据尺度的指标，否则数值较大的序列会在比较中占主导地位。MAPE 通过将每个误差相对于实际值来表示，解决了这一问题，它或许已成为此用途中使用最广泛的无量纲指标<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。它是 1982 年首届 M 竞赛的主要指标，该竞赛在多达 1,001 条时间序列上评估了 15 种预测方法<sup>[6](https://robjhyndman.com/papers/mase.pdf)</sup><sup> • </sup><sup>[11](https://onlinelibrary.wiley.com/doi/abs/10.1002/for.3980010202)</sup>，且大多数预测教科书都推荐使用它<sup>[6](https://robjhyndman.com/papers/mase.pdf)</sup>。

其可解释性也推动了它在实践中的采用。10% 的 MAPE 可直接理解为平均偏差为实际值的十分之一，这使其成为需求规划中常见的 KPI，也是优化组合预测的便捷目标；已有目标规划公式通过选择组合权重来最小化平均绝对百分比误差或最大绝对百分比误差<sup>[12](https://www.sciencedirect.com/science/article/abs/pii/S0305054800000265)</sup>。

## 局限性

**除以零。** 当实际值为零时，百分比误差无定义；而当实际值较小时，即使适度的绝对误差也会产生非常大且不稳定的百分比<sup>[1](https://www.mathworks.com/help/matlab/ref/mape.html)</sup><sup> • </sup><sup>[5](https://scikit-learn.org/1.5/modules/generated/sklearn.metrics.mean_absolute_percentage_error.html)</sup>。这在间歇性需求中最为要紧，因为其中许多时期销售额为零。海因德曼（Hyndman）与科勒（Koehler）表明，在此类序列的预测准确度表中，包括 MAPE 在内的许多指标会产生无穷大或无定义的值，他们指出间歇性需求数据常常包含零值，因此受影响的序列并不罕见<sup>[6](https://robjhyndman.com/papers/mase.pdf)</sup>。供应商文档得出的实际结论是，MAPE 只对全程有销售的序列才有意义；单个零值时期就可能使原本良好的预测结果无法使用，这就是为什么存在“忽略零值”选项，以及为什么零值时期较多的序列需要采用不同的指标<sup>[13](https://help.sap.com/doc/8c59af04560f473e899e515fb6db73bf/2022.1/en-US/FMO-EN.pdf)</sup>。

**不对称性与偏向低预测。** MAPE 对高于和低于实际值的误差处理方式不同。低于实际值达整个实际值的预测，其百分比误差恰好为 100%，而高于实际值的预测，其百分比误差没有上界<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。阿姆斯特朗（Armstrong）与科洛皮（Collopy）在对误差指标的实证比较中得出结论：当预期会出现较大误差时不应使用 MAPE，因为它偏向于低预测<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。托法利斯（Tofallis）报告了相同的方向性偏差：当用于在相互竞争的预测方法之间进行选择时，MAPE 会系统性地选中那些预测值偏低的方法<sup>[4](https://arxiv.org/abs/2105.05249)</sup>。这种偏差也作用于点预测本身。在将 MAPE 作为损失函数时，预测分布的最优点预测是 \( (-1) \)-中位数，即按 \( 1/y \) 加权的密度中位数，它总是小于或等于普通中位数，有时会显著更低<sup>[14](https://academic.oup.com/jrsssc/article/72/1/144/7051076)</sup>。经济学中的一项理论分析得出了类似的结论：损失与绝对百分比误差挂钩的预测者有动机将其点预测向下偏移<sup>[15](https://www.sciencedirect.com/science/article/pii/S0165176511003119)</sup>。

**受限的数据类型。** MAPE 仅对比例尺度数据有意义，即具有有意义的零点的数据，因此不适用于取负值的序列，也不适用于诸如摄氏温度之类的区间尺度量<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。

## 替代指标与相关指标

有几类指标可以弥补 MAPE 的弱点。

- **对称 MAPE（sMAPE）**，定义为 \( \mathrm{mean}(200 \lvert Y_t - F_t \rvert / (Y_t + F_t)) \)，曾在 M3 竞赛中使用<sup>[9](https://robjhyndman.com/papers/foresight.pdf)</sup><sup> • </sup><sup>[7](https://www.sciencedirect.com/science/article/pii/S0169207000000571)</sup>。它旨在消除不对称性，但古德温（Goodwin）与劳顿（Lawton）表明，在处理正负误差时它远非对称，尤其是当这些误差的绝对值较大时<sup>[16](https://www.sciencedirect.com/science/article/pii/S0169207099000072)</sup>。
- **基于中位数的指标**，如中位数 APE（MdAPE），可减少偏向低预测的偏差，并提供标准的截尾规则；阿姆斯特朗（Armstrong）与科洛皮（Collopy）建议在有多条序列可用时使用 MdAPE 在方法之间进行选择<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。
- **缩放误差。** 海因德曼（Hyndman）与科勒（Koehler）提出了平均绝对缩放误差（MASE），它将每个误差按朴素预测的样本内平均绝对误差进行缩放，从而给出一个普遍适用且不存在百分比误差除以零问题的指标<sup>[8](https://w.robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/)</sup><sup> • </sup><sup>[9](https://robjhyndman.com/papers/foresight.pdf)</sup>。他们认为它应成为比较多条时间序列预测准确度的标准指标<sup>[8](https://w.robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/)</sup>。
- **MAAPE**，即平均反正切绝对百分比误差，对绝对百分比误差应用反正切函数使其有界，是专门为解决 MAPE 在间歇性需求预测中的表现而提出的<sup>[2](https://www.sciencedirect.com/science/article/pii/S0169207016000121)</sup>。
- **对数准确度比。** 托法利斯（Tofallis）提出使用 \( \log(\text{prediction}/\text{actual}) \) 作为相对准确度指标，以避免低预测偏差；对于由乘性误差因子建模的异方差数据，模拟表明它在模型选择上远优于 MAPE<sup>[4](https://arxiv.org/abs/2105.05249)</sup>。

## MAPE 作为回归目标

当 MAPE 被用作拟合或选择回归模型的损失函数时，最小化它具有特定的解释：在 MAPE 下寻找最佳模型等价于进行加权 MAE 回归，其权重取决于目标值<sup>[10](https://arxiv.org/abs/1506.04176)</sup>。机器学习与统计学领域的研究者德米特纳雷（De Myttenaere）、戈尔登（Golden）、勒格朗（Le Grand）与罗西（Rossi）还表明，当以 MAPE 取代 MAE 作为损失时，经验风险最小化的普遍一致性仍然可能成立<sup>[10](https://arxiv.org/abs/1506.04176)</sup>。与加权绝对误差回归的联系解释了这一实际观察：MAPE 最优的预测会被拉向低值，因为实际值较小的观测会获得较大的权重<sup>[10](https://arxiv.org/abs/1506.04176)</sup><sup> • </sup><sup>[14](https://academic.oup.com/jrsssc/article/72/1/144/7051076)</sup>。

## 实践指导

证据支持若干实用规则。仅当实际值安全地远离零且数据具有有意义的零点时才使用 MAPE<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup><sup> • </sup><sup>[17](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-understand-automated-ml)</sup>。预期它会偏向低预测，且当预期会出现较大误差时不要用它来比较方法<sup>[3](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)</sup>。对于间歇性或块状需求，宜采用 MASE 或 MAAPE 等缩放或有界指标<sup>[6](https://robjhyndman.com/papers/mase.pdf)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/pii/S0169207016000121)</sup>。而当需要一个覆盖整个组合的单一数字时，请记住一个指标无法同时服务于所有目的；单品层面的诊断、计划人员的评估和高管汇报可能各自需要不同的指标<sup>[18](https://dataleo.com/insights/a15db15e-0bfd-4572-8048-df7882a92f99)</sup>。

## References

1. [mape – Mean absolute percentage error between arrays, MathWorks MATLAB documentation](https://www.mathworks.com/help/matlab/ref/mape.html)
2. [A new metric of absolute percentage error for intermittent demand forecasts, International Journal of Forecasting](https://www.sciencedirect.com/science/article/pii/S0169207016000121)
3. [Armstrong, J. S., & Collopy, F. (1992). Error Measures for Generalizing About Forecasting Methods: Empirical Comparisons. International Journal of Forecasting 8(1), 69–80](https://marketing.wharton.upenn.edu/wp-content/uploads/2022/02/149-JSA-Error-Measures-for-Generalizing-about-Forecasting-Methods-Empirical-Comparisons.pdf)
4. [Tofallis, C. A better measure of relative prediction accuracy for model selection and model estimation, arXiv:2105.05249](https://arxiv.org/abs/2105.05249)
5. [mean_absolute_percentage_error, scikit-learn 1.5.2 documentation](https://scikit-learn.org/1.5/modules/generated/sklearn.metrics.mean_absolute_percentage_error.html)
6. [Hyndman, R. J., & Koehler, A. B. Another look at measures of forecast accuracy (working paper PDF)](https://robjhyndman.com/papers/mase.pdf)
7. [Makridakis, S., & Hibon, M. (2000). The M3-Competition: results, conclusions and implications. International Journal of Forecasting 16(4), 451–476](https://www.sciencedirect.com/science/article/pii/S0169207000000571)
8. [Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting 22(4), 679–688](https://w.robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/)
9. [Hyndman, R. J. Another look at forecast-accuracy metrics for intermittent demand, Foresight](https://robjhyndman.com/papers/foresight.pdf)
10. [De Myttenaere, A., Golden, B., Le Grand, B., & Rossi, F. (2015). Using the Mean Absolute Percentage Error for Regression Models, arXiv:1506.04176](https://arxiv.org/abs/1506.04176)
11. [Makridakis, S., et al. (1982). The accuracy of extrapolation (time series) methods: Results of a forecasting competition. Journal of Forecasting 1, 111–153](https://onlinelibrary.wiley.com/doi/abs/10.1002/for.3980010202)
12. [A note on minimizing absolute percentage error in combined forecasts, Computers & Operations Research 28(11), 1141–1147](https://www.sciencedirect.com/science/article/abs/pii/S0305054800000265)
13. [SAP Forecasting & Monitoring Tool: Calculation of Error Measure](https://help.sap.com/doc/8c59af04560f473e899e515fb6db73bf/2022.1/en-US/FMO-EN.pdf)
14. [Hierarchical dynamic modelling for individualized Bayesian forecasting, JRSS Series C 72(1), 144–](https://academic.oup.com/jrsssc/article/72/1/144/7051076)
15. [Mean absolute percentage error and bias in economic forecasting, Economics Letters 113(3), 259–262](https://www.sciencedirect.com/science/article/pii/S0165176511003119)
16. [Goodwin, P., & Lawton, R. On the asymmetry of the symmetric MAPE, International Journal of Forecasting](https://www.sciencedirect.com/science/article/pii/S0169207099000072)
17. [Evaluate AutoML experiment results, Azure Machine Learning, Microsoft Learn](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-understand-automated-ml)
18. [Is MAPE Still the Right Forecast Accuracy Metric for Demand Planning?, Dataleo Supply Chain AI Radar](https://dataleo.com/insights/a15db15e-0bfd-4572-8048-df7882a92f99)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Bayesian statistics › Bayesian probability and inference foundations › Bayesian estimation and filtering › Loss functions and Bayes risk

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/mean-absolute-percentage-error

English original: https://www.edgepedia.org/mean-absolute-percentage-error
