Ensemble Techniques

The Data Science unit on combining many models into one. When a vote or an average beats its members and when it cannot, from the binomial majority vote and the ambiguity decomposition; bagging and why averaging over training sets removes variance; AdaBoost derived from the exponential loss and gradient boosting from gradient descent, both worked by hand; and stacking with out-of-fold predictions, worked on a diabetes study, breast cancer biopsies and Friedman's simulated regression problem with seeded experiments.

Combining many models often beats the best single one, provided the members are better than chance and their errors differ. Five decision stumps on breast cancer biopsies vote worse than their best member, and the same five votes, weighted by how accurate each stump is, beat every one of them. This unit works out why, and then treats the three standard ways of building a combination on purpose: averaging one method over resampled data, fitting simple models in sequence to the errors left so far, and learning how to weigh different kinds of model.

The running examples are three. The diabetes study of Efron, Hastie, Johnstone and Tibshirani (2004) records ten baseline measurements and a measure of disease progression one year later for 442 patients, and carries the regression examples. The Breast Cancer Wisconsin (Diagnostic) data (Wolberg, Mangasarian, Street and Street, 1993) describe 569 tumors by 30 measurements of cell nuclei and carry the classification examples. Friedman's (1991) first test problem, ten uniform inputs of which five are irrelevant, gives a known truth, so that the error of a method can be split into bias and variance and compared across methods by seeded simulation.

Articles, in order

  • Introduction to Ensemble Models: the majority vote of independent classifiers computed from the binomial distribution, with a Hoeffding bound on how fast it improves; what correlation between voters does to it, in a model whose ceiling is derived; why five stumps vote worse than their best member and how log-odds weights, derived as the Bayes rule for independent votes, repair it; the ambiguity decomposition of Krogh and Vedelsby, which shows the average of regression models is never worse than its average member and by how much it is better; and when the average of two models beats the better one.
  • Bagging: Breiman's aggregated predictor and the proof that it lowers expected squared error by exactly the variance of the method; an experiment on Friedman's problem showing that bagging transforms deep and shallow trees and leaves least squares and nearest neighbors unchanged; the error of a bagged model as a constant plus a term in $1/B$, which settles how many members are enough; a smooth estimator that bagging makes worse; and why bagging can make a poor classifier worse and leaves nearest neighbors alone.
  • Boosting: AdaBoost worked by hand on ten points and derived as forward stagewise fitting with the exponential loss, with Freund and Schapire's training-error bound proved; a diagonal boundary that boosted stumps follow and bagged stumps cannot; what mislabeled data do to AdaBoost; gradient boosting as gradient descent in function space, worked by hand on eight patients with squared and absolute error and on the ten points with the logistic loss; and the trade-off between the learning rate and the number of trees.
  • Stacking: Wolpert's stacked generalization and Breiman's stacked regressions; why the meta model must be fitted to out-of-fold predictions, shown by a stack that gives all its weight to a random forest and proved for nested regressions; non-negative weights and Breiman's condition for when the best single model is also the best stack; a simulation where a stack beats every member, and two real datasets where it does not.

The order runs from conditions to methods. The first article establishes when a combination can help at all, and each later article builds the members' disagreement in a different way: bagging by resampling the data, boosting by reweighting it or refitting its residuals, stacking by using different algorithms and learning their weights. Random Forests, in the Decision Trees section, adds random input selection to bagged trees and belongs with this unit in practice. Each article ends with worked problems that extend it on its own data and open questions for a reader or an agent running the repository's experiments; every number is recomputed, with assertions, by a script in tools/experiments/data-science/. The standard textbook treatments are Hastie, Tibshirani and Friedman (2009, chapters 8, 10 and 16) and, for bagging and boosting, James, Witten, Hastie and Tibshirani (2021, chapter 8); the original papers are listed below.

Where the site goes deeper

The trees that ensembles are most often built from are the subject of Tree Models in Practice, and the methods for judging an ensemble against its best member, from cross-validation to the bootstrap, are in Evaluating Model Performance. The Statistics collection proves the theory beneath them: Prediction Error and Model Choice proves what cross-validation estimates, Resampling Methods proves why the bootstrap behind bagging works, and Statistical Learning Theory proves the concentration and margin bounds that the analysis of voting and boosting draws on, in Concentration Inequalities: Hoeffding and Bernstein and Rademacher Complexity. In information retrieval, Rank Fusion combines the ranked lists of several search systems, and LambdaRank and LambdaMART, in the Learning to Rank Methods unit, builds a ranker from gradient-boosted trees.

Several subjects the unit touches would fit a later collection of their own: second-order boosting and the histogram methods of modern boosted-tree libraries, the handling of categorical inputs, the bias of variable importance in tree ensembles, and the comparison of boosted trees with neural networks on tabular data.

References

  • Breiman, L. (1996a). Bagging predictors. Machine Learning, 24(2), 123–140. record · 4 pages
  • Breiman, L. (1996b). Stacked regressions. Machine Learning, 24(1), 49–64. record · 3 pages
  • Efron, B., Hastie, T., Johnstone, I., and Tibshirani, R. (2004). Least angle regression. The Annals of Statistics, 32(2), 407–499. record · 21 pages
  • Freund, Y., and Schapire, R. E. (1997). A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55(1), 119–139. record · 3 pages
  • Friedman, J. H. (1991). Multivariate adaptive regression splines. The Annals of Statistics, 19(1), 1–67. record · 5 pages
  • Friedman, J. H. (2001). Greedy function approximation: A gradient boosting machine. The Annals of Statistics, 29(5), 1189–1232. record · 4 pages
  • Hastie, T., Tibshirani, R., and Friedman, J. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2nd ed.). Springer. record · 39 pages
  • James, G., Witten, D., Hastie, T., and Tibshirani, R. (2021). An Introduction to Statistical Learning with Applications in R (2nd ed.). Springer. record · 39 pages
  • Krogh, A., and Vedelsby, J. (1995). Neural network ensembles, cross validation, and active learning. In G. Tesauro, D. Touretzky and T. Leen (Eds.), Advances in Neural Information Processing Systems 7 (pp. 231–238). MIT Press. record · 2 pages
  • Wolberg, W., Mangasarian, O., Street, N., and Street, W. (1993). Breast Cancer Wisconsin (Diagnostic) [Data set]. UCI Machine Learning Repository. https://doi.org/10.24432/C5DW2B record · 15 pages
  • Wolpert, D. H. (1992). Stacked generalization. Neural Networks, 5(2), 241–259. record · 3 pages