# 集成回归

集成回归是一种机器学习方法，它将若干回归模型组合成一个预测器，以提高数值目标的精度。实践者并不拟合单一函数，而是训练多个回归器并聚合它们的预测——通常通过取平均——从而使各个模型的误差部分抵消。生成成员模型的两种经典方式是袋装法（bagging），即在重采样数据上训练模型；以及提升法（boosting），即按顺序训练模型；堆叠法（stacking）则是在成员模型的输出上训练一个元模型，是第三条集成路线。<sup>[1](http://jmlr.org/papers/volume24/23-0041/23-0041.pdf)</sup><sup> • </sup><sup>[2](https://doi.org/10.1049%2Fcit2.70030)</sup>

| 关键事实 | 详情 |
|---|---|
| 产出什么 | 由若干基回归器构建的、面向连续目标的单一聚合预测器<sup>[3](https://dl.acm.org/doi/10.1145/2379776.2379786)</sup> |
| 主要原理 | 袋装法降低不稳定学习器的方差；提升法主要降低偏差<sup>[4](https://stat.ethz.ch/Manuscripts/buhlmann/handbook-cs-rev2010.pdf)</sup> |
| 典型集成规模 | 袋装法中 M 常取 50 或 100 个自助采样重复<sup>[4](https://stat.ethz.ch/Manuscripts/buhlmann/handbook-cs-rev2010.pdf)</sup> |
| 默认回归损失 | scikit-learn 的 GradientBoostingRegressor 中为 squared_error；也可选用 absolute_error、huber 和 quantile<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup> |
| 研究最充分的场景 | 表格数据，基于树的集成在典型基准上优于深度网络<sup>[6](https://papers.neurips.cc/paper_files/paper/2022/file/0378c7692da36807bdec87ab043cdadc-Paper-Datasets_and_Benchmarks.pdf)</sup> |
| 可扩展实现 | XGBoost 是树提升的一种可扩展实现<sup>[7](https://doi.org/10.48550/arxiv.1603.02754)</sup> |

## 工作原理

统计学原理是偏差–方差分解。Breiman 指出，当组合低偏差预测器（如树和神经网络）时，降低由训练集变异性引起的预测变异性是关键因素，因为这种变异性的程度是泛化误差的主导因素。<sup>[8](https://statistics.berkeley.edu/sites/default/files/tech-reports/518.pdf)</sup> Bühlmann 总结了分工：袋装法是对不稳定基过程的方差缩减方案，而提升法则主要降低基过程的模型偏差，二者是非常不同的集成方法。<sup>[4](https://stat.ethz.ch/Manuscripts/buhlmann/handbook-cs-rev2010.pdf)</sup>

这两个家族产生多样性的方式也不同。袋装法通过在不同自助样本上训练来隐式注入多样性，而提升法则通过重新加权数据分布、使基学习器聚焦于更困难的实例来显式注入多样性。<sup>[9](https://kar.kent.ac.uk/100315/1/Knowl-Engin-Review-2023-Cagnini-post-review.pdf)</sup>

## 如何实施

《ACM 计算综述》上的一项综述将集成回归分为三个阶段：生成阶段（创建多样化的成员）、剪枝阶段（移除无用的成员）和整合阶段（组合它们的预测）。<sup>[3](https://dl.acm.org/doi/10.1145/2379776.2379786)</sup> 在实践中：

1. **生成成员。** 对于袋装法，从学习集中有放回地抽取 n 个案例的自助样本，拟合回归器，重复 M 次，通常 M = 50 或 100；袋装预测是 M 个估计的均值。<sup>[4](https://stat.ethz.ch/Manuscripts/buhlmann/handbook-cs-rev2010.pdf)</sup> 对于提升法，分阶段拟合浅层树，每棵树拟合所选损失的负梯度。<sup>[10](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor)</sup>
2. **选择与方案匹配的基学习器。** 袋装法最适合强而复杂的模型，如完全生长的树；提升法最适合弱模型，如浅层树。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup>
3. **调整规模和采样。** 对于随机森林，经验上的良好默认值是回归时 max_features=1.0（使用全部特征），分类时 max_features=“sqrt”，且结果通常在超过临界树数后趋于平稳。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup> 使用自助采样时，可以通过设置 oob_score=True 来估计袋外泛化误差。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup>
4. **整合。** 袋装类集成取平均；对于堆叠法，在成员模型的交叉验证预测上训练最终估计器。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup>

## 起源

[Leo Breiman](https://www.edgepedia.org/zh/leo-breiman) 于 1996 年在《Machine Learning》上提出了袋装法（bagging，是“自助采样聚合”的简称）：该方法从学习集的自助重复中生成预测器的多个版本，对数值结果取平均，对类别采用相对多数投票；用分类与回归树以及线性回归中的子集选择所做的测试显示出显著的精度提升，而预测方法的不稳定性是其中的关键要素。<sup>[11](https://doi.org/10.1023/a:1018054314350)</sup> 提升法可追溯到 Kearns 和 Valiant 提出的问题：一个仅比随机猜测略好的弱学习算法，能否被提升为任意精确的强学习算法；Schapire 于 1989 年给出了第一个可证明的多项式时间提升算法，Freund 一年后开发了更高效的“多数提升法”，而 [Yoav Freund](https://www.edgepedia.org/zh/yoav-freund) 和 Robert E. Schapire 的决策论推广于 1997 年发表在《Journal of Computer and System Sciences》上，其扩展摘要在 1995 年 3 月于巴塞罗那举行的第二届欧洲计算学习理论会议上发表；他们的算法改编了 Littlestone 和 Warmuth 的乘法权重更新规则，且不需要关于弱学习器性能的先验知识。<sup>[12](https://doi.org/10.1006/jcss.1997.1504)</sup> [Jerome H. Friedman](https://www.edgepedia.org/zh/jerome-h-friedman) 于 2001 年在《The Annals of Statistics》上发表了梯度提升机，<sup>[13](https://doi.org/10.1214/aos/1013203451)</sup> 其基础是 20 世纪 90 年代末将提升算法推导为梯度下降算法的工作（文献中引作 Breiman 1997、Schapire 和 Singer 1998、Friedman 及其同事 1999、Mason 及其同事 1999）。<sup>[14](https://papers.nips.cc/paper_files/paper/2000/file/8d9fc2308c8f28d2a7d2f6f48801c705-Paper.pdf)</sup> Breiman 的随机森林论文于 2001 年发表在《Machine Learning》上，<sup>[15](https://doi.org/10.1023/a:1010933404324)</sup> Chen 和 Guestrin 的 XGBoost 论文于 2016 年发表。<sup>[7](https://doi.org/10.48550/arxiv.1603.02754)</sup> 没有任何已发表的文献记载 Schapire、Freund、Breiman 和 Friedman 之间存在优先权争议；已发表的归属说法彼此一致。

## 变体

**随机森林**修改了袋装法，在每次分裂时还随机选取特征子集；两个随机性来源（自助样本和随机特征选择）降低了森林估计器的方差，有时以轻微增加偏差为代价。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup>

**AdaBoost.R2** 是 scikit-learn 的 AdaBoostRegressor 中实现的 AdaBoost 的回归形式。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup> **梯度提升**将提升推广到任意可微损失函数；预测是加性的，\( \hat{y}_i = F_M(x_i) = \sum_{m=1}^{M} h_m(x_i) \)，以 \( F_m(x) = F_{m-1}(x) + h_m(x) \) 的方式贪婪构建，其中 \( h_m = \arg\min_{h} \sum_{i=1}^{n} l(y_i, F_{m-1}(x_i) + h(x_i)) \)。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup> 每个阶段在损失的负梯度上拟合一棵回归树。<sup>[10](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor)</sup> 损失选项包括 squared_error（默认）、absolute_error（对异常值较不敏感）、huber（将 absolute_error 的稳健性与对小残差的二次惩罚相结合）以及用于条件分位数估计的 quantile。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup>

**XGBoost** 是一个可扩展的端到端树提升系统，具有针对稀疏数据的稀疏感知算法和用于近似树学习的加权分位数草图；其正则化目标为 \( \mathcal{L}(\phi) = \sum_i l(\hat{y}_i, y_i) + \sum_k \Omega(f_k) \)，其中 \( \Omega(f) = \gamma T + \tfrac{1}{2} \lambda \sum_j w_j^2 \)，k 索引树，T 是叶子数，w 是叶子分数。<sup>[5](https://scikit-learn.org/stable/modules/ensemble)</sup> **堆叠法**将基模型的预测输出视为新特征，由元学习器从中产生最终结果，这与加权投票方案形成对比。<sup>[2](https://doi.org/10.1049%2Fcit2.70030)</sup> Sascha Marton 及其同事于 2023 年在 arXiv 上提出了 GRANDE，这是一种将基于梯度的优化应用于表格数据决策树集成的替代方案。<sup>[16](https://doi.org/10.48550/arxiv.2309.17130)</sup>

## 应用

基于树的集成主导了表格数据：在典型的表格基准上，最好的方法是集成——袋装法（随机森林）或提升法（XGBoost、GBT），以决策树为弱学习器，而决定性因素似乎是树本身。<sup>[6](https://papers.neurips.cc/paper_files/paper/2022/file/0378c7692da36807bdec87ab043cdadc-Paper-Datasets_and_Benchmarks.pdf)</sup> 随机森林的应用遍及从金融到生物信息学的各个学科。<sup>[17](https://jmlr.org/papers/volume26/24-0255/24-0255.pdf)</sup> XGBoost 出现在商店销售预测、高能物理事件分类、网页文本分类、广告点击率预测和恶意软件分类的获奖方案中。<sup>[7](https://doi.org/10.48550/arxiv.1603.02754)</sup> 在不平衡回归基准中，基于 XGBoost 的模型在各项评估指标上最常取得最佳性能，在 MSE 上具有统计显著优势；在稀有案例比例较高的数据集上，袋装法给出了最佳 MSE，而在稀有度更高的数据集上 XGBoost 表现最佳。<sup>[18](https://proceedings.mlr.press/v74/moniz17a/moniz17a.pdf)</sup>

## 局限与替代方案

**提升法可能过拟合。** 由于相继的学习器聚焦于困难样例，该过程系统性地降低偏差，但若不加以控制则可能增加方差；XGBoost、LightGBM 和 CatBoost 等现代库包含正则化机制（学习率收缩、深度限制、子采样、最小子节点权重）来对此加以控制。<sup>[19](https://arxiv.org/html/2512.05469)</sup> AdaBoost 的权重更新方案在噪声实例上会退化，因为被误分类的噪声点会获得迭代递增的重要性，导致学习器过拟合。<sup>[9](https://kar.kent.ac.uk/100315/1/Knowl-Engin-Review-2023-Cagnini-post-review.pdf)</sup> 无约束的堆叠法也可能因相关的基础预测而过拟合；堆叠法是否优于最佳单一模型取决于基学习器的多样性和可用数据。<sup>[19](https://arxiv.org/html/2512.05469)</sup>

**与神经网络的比较结果不一。** Grinsztajn 及其同事发现基于树的集成在典型表格数据上仍优于深度学习，<sup>[6](https://papers.neurips.cc/paper_files/paper/2022/file/0378c7692da36807bdec87ab043cdadc-Paper-Datasets_and_Benchmarks.pdf)</sup> 但一项 NeurIPS 2023 基准研究指出，近期的比较发现神经网络或 GBDT 中哪一方领先取决于具体研究，因此没有哪个家族普遍占优，相对性能取决于调参和正则化方案。<sup>[20](https://proceedings.neurips.cc/paper_files/paper/2023/file/f06d5ebd4ff40b40dd97e30cee632123-Paper-Datasets_and_Benchmarks.pdf)</sup> 已发表的比较没有提供与核回归或高斯过程的量化 RMSE/MAE 对比，也没有提供集成与单一模型的计算成本数据。

## References

1. [A Unified Theory of Diversity in Ensemble Learning](http://jmlr.org/papers/volume24/23-0041/23-0041.pdf)
2. [Diverse Models, United Goal: A Comprehensive Survey of Ensemble Learning (Fan, 2025, CAAI Transactions on Intelligence Technology)](https://doi.org/10.1049%2Fcit2.70030)
3. [Ensemble approaches for regression: A survey](https://dl.acm.org/doi/10.1145/2379776.2379786)
4. [Bagging, Boosting and Ensemble Methods (Bühlmann, handbook chapter)](https://stat.ethz.ch/Manuscripts/buhlmann/handbook-cs-rev2010.pdf)
5. [1.11. Ensembles: Gradient boosting, random forests, bagging, voting, stacking, scikit-learn documentation](https://scikit-learn.org/stable/modules/ensemble)
6. [Why do tree-based models still outperform deep learning on typical tabular data? (Grinsztajn et al., NeurIPS 2022)](https://papers.neurips.cc/paper_files/paper/2022/file/0378c7692da36807bdec87ab043cdadc-Paper-Datasets_and_Benchmarks.pdf)
7. [Chen, Tianqi, Guestrin, Carlos (2016). XGBoost: A Scalable Tree Boosting System. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1603.02754)
8. [Randomizing Outputs to Increase Prediction Accuracy (Breiman tech report)](https://statistics.berkeley.edu/sites/default/files/tech-reports/518.pdf)
9. [Knowledge Engineering Review survey on ensemble methods (Cagnini et al., 2023)](https://kar.kent.ac.uk/100315/1/Knowl-Engin-Review-2023-Cagnini-post-review.pdf)
10. [GradientBoostingRegressor, scikit-learn API documentation](https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor)
11. [Leo Breiman (1996). Bagging Predictors. Machine Learning.](https://doi.org/10.1023/a:1018054314350)
12. [Yoav Freund, Robert E Schapire (1997). A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting. Journal of Computer and System Sciences.](https://doi.org/10.1006/jcss.1997.1504)
13. [Jerome H. Friedman (2001). Greedy function approximation: A gradient boosting machine.. The Annals of Statistics.](https://doi.org/10.1214/aos/1013203451)
14. [A Gradient-Based Boosting Algorithm for Regression Problems](https://papers.nips.cc/paper_files/paper/2000/file/8d9fc2308c8f28d2a7d2f6f48801c705-Paper.pdf)
15. [Leo Breiman (2001). Random Forests. Machine Learning.](https://doi.org/10.1023/a:1010933404324)
16. [Marton, Sascha and colleagues (2023). GRANDE: Gradient-Based Decision Tree Ensembles for Tabular Data. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2309.17130)
17. [Randomization Can Reduce Both Bias and Variance: A Case Study in Random Forests](https://jmlr.org/papers/volume26/24-0255/24-0255.pdf)
18. [Evaluation of Ensemble Methods in Imbalanced Regression Tasks](https://proceedings.mlr.press/v74/moniz17a/moniz17a.pdf)
19. [How Ensemble Learning Balances Accuracy and Overfitting: A Bias–Variance Perspective on Tabular Data](https://arxiv.org/html/2512.05469)
20. [When Do Neural Nets Outperform Boosted Trees on Tabular Data? (NeurIPS 2023 Datasets and Benchmarks)](https://proceedings.neurips.cc/paper_files/paper/2023/file/f06d5ebd4ff40b40dd97e30cee632123-Paper-Datasets_and_Benchmarks.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 25, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Machine learning methods › Ensemble, boosting, and transfer methods

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/ensemble-regression

English original: https://www.edgepedia.org/ensemble-regression
