Random-forest-like methods

A selection of randomly stopped clocks is never far from wrong.

September 23, 2015 — June 17, 2021

model selection

Doubling down on ensemble methods; mixing predictions from many weak learners (in this case decision trees) to get strong learners. Boosting, bagging and other weak-learner ensembles.

Figure 1

There are many flavours of random-forest-like learning systems. The rule of thumb seems to be “Fast to train, fast to use. Gets you results. May not get you answers.” In that regard they resemble neural networks, but from the previous hype cycle.

Reasons for popularity:

  1. Decision trees can easily be applied to just about any tabular data so input preprocessing can be minimal
  2. These methods are in a certain sense self-regularising, so you can skip (certain) hyperparameter tuning
  3. There is some kind of tractable asymptotic performance analysis available for some apparently?

Related: model averaging, neural ensembles, dropout, bootstrap.

1 Random trees, forests, jungles

2 Self-regularising properties

Jeremy Kun: Why Boosting Doesn’t Overfit:

Boosting, which we covered in gruesome detail previously, has a natural measure of complexity represented by the number of rounds you run the algorithm for. Each round adds one additional “weak learner” weighted vote. So running for a thousand rounds gives a vote of a thousand weak learners. Despite this, boosting doesn’t over-fit on many datasets. In fact, and this is a shocking fact, researchers observed that Boosting would hit zero training error, they kept running it for more rounds, and the generalization error kept going down! It seemed like the complexity could grow arbitrarily without penalty. […] this phenomenon is a fact about voting schemes, not boosting in particular.


3 Gradient boosting

The idea of gradient boosting originated in the observation by Leo Breiman that boosting can be interpreted as an optimization algorithm on a suitable cost function Breiman (1997). Explicit regression gradient boosting algorithms were subsequently developed by Jerome H. Friedman, (J. H. Friedman 2001, 2002) simultaneously with the more general functional gradient boosting perspective of Llew Mason, Jonathan Baxter, Peter Bartlett and Marcus Frean (Mason et al. 1999). The later two papers introduced the view of boosting algorithms as iterative functional gradient descent algorithms. That is, algorithms that optimize a cost function over function space by iteratively choosing a function (weak hypothesis) that points in the negative gradient direction. This functional gradient view of boosting has led to the development of boosting algorithms in many areas of machine learning and statistics beyond regression and classification.

4 Bayes

The Bayesian Additive Regression Trees Chipman, George, and McCulloch (2010), are wildly popular and successful in machine learning competitions. Kenneth Tay introduces them well.

5 Implementations.

5.1 LightGBM

LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed and efficient with the following advantages:

5.2 xgboost


XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, flexible and portable. It implements machine learning algorithms under the Gradient Boosting framework. XGBoost provides a parallel tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way. The same code runs on major distributed environment (Hadoop, SGE, MPI) and can solve problems beyond billions of examples.

See also * chengsoonong/xgboost-tuner: A library for automatically tuning XGBoost parameters.

5.3 catboost


5.4 surfin

Surfin by shftan

This R package computes uncertainty for random forest predictions using a fast implementation of random forests in C++. This is an exciting time for research into the theoretical properties of random forests. This R package aims to provide all state-of-the-art variance estimates in one place, to expedite research in this area and make it easier for practitioners to compare estimates.

Two variance estimates are provided: U-statistics based (Mentch & Hooker, 2016) and infinitesimal jackknife on bootstrap samples (Wager, Hastie, Efron, 2014), the latter as a wrapper to the authors’ R code randomForestCI.

More variance estimates coming soon: (1) Bootstrap-of-little-bags (Sexton and Laake 2009) (2) Infinitesimal jackknife on subsamples (Wager & Athey, 2017; Athey, Tibshirani, Wager, 2016) as a wrapper to the authors’ R package grf.

Vignette: How Uncertain Are Your Random Forest Predictions?

5.5 bartmachine


We present a new package in R implementing Bayesian additive regression trees (BART). The package introduces many new features for data analysis using BART such as variable selection, interaction detection, model diagnostic plots, incorporation of missing data and the ability to save trees for future prediction It is significantly faster than the current R implementation, parallelized, and capable of handling both large sample sizes and high-dimensional data.

6 References

Alon, Gonen, Hazan, et al. 2020. Boosting Simple Learners.” arXiv:2001.11704 [Cs, Stat].
Alquier. 2021. User-Friendly Introduction to PAC-Bayes Bounds.” arXiv:2110.11216 [Cs, Math, Stat].
Athey, Tibshirani, and Wager. 2019. Generalized Random Forests.” Annals of Statistics.
Athey, and Wager. 2019. Estimating Treatment Effects with Causal Forests: An Application.” arXiv:1902.07409 [Stat].
Balog, Lakshminarayanan, Ghahramani, et al. 2016. The Mondrian Kernel.” arXiv:1606.05241 [Stat].
Balog, and Teh. 2015. The Mondrian Process for Machine Learning.” arXiv:1507.05181 [Cs, Stat].
Bickel, Li, Tsybakov, et al. 2006. Regularization in Statistics.” Test.
Breiman. 1996. Bagging Predictors.” Machine Learning.
———. 1997. Arcing the Edge.”
Bühlmann, and van de Geer. 2011. Statistics for High-Dimensional Data: Methods, Theory and Applications.
Chipman, George, and McCulloch. 2010. BART: Bayesian Additive Regression Trees.” The Annals of Applied Statistics.
Clarke. 2003. Comparing Bayes Model Averaging and Stacking When Model Approximation Error Cannot Be Ignored.” The Journal of Machine Learning Research.
Criminisi, Shotton, and Konukoglu. 2012. Decision Forests: A Unified Framework for Classification, Regression, Density Estimation, Manifold Learning and Semi-Supervised Learning.
Curth, Jeffares, and van der Schaar. 2024. Why Do Random Forests Work? Understanding Tree Ensembles as Self-Regularizing Adaptive Smoothers.”
Davis, and Nielsen. 2020. Modeling of Time Series Using Random Forests: Theoretical Developments.” Electronic Journal of Statistics.
Díaz-Avalos, Juan, and Mateu. 2012. Similarity Measures of Conditional Intensity Functions to Test Separability in Multidimensional Point Processes.” Stochastic Environmental Research and Risk Assessment.
Efron. 2021. Resampling Plans and the Estimation of Prediction Error.” Stats.
Fernández-Delgado, Cernadas, Barro, et al. 2014. Do We Need Hundreds of Classifiers to Solve Real World Classification Problems? Journal of Machine Learning Research.
Friedman, Jerome H. 2001. Greedy Function Approximation: A Gradient Boosting Machine. The Annals of Statistics.
———. 2002. Stochastic Gradient Boosting.” Computational Statistics & Data Analysis, Nonlinear Methods and Data Mining,.
Friedman, Jerome, Hastie, and Tibshirani. 2000. Additive Logistic Regression: A Statistical View of Boosting (With Discussion and a Rejoinder by the Authors).” The Annals of Statistics.
Gall, and Lempitsky. 2013. Class-Specific Hough Forests for Object Detection.” In Decision Forests for Computer Vision and Medical Image Analysis. Advances in Computer Vision and Pattern Recognition.
Gammerman, and Vovk. 2007. Hedging Predictions in Machine Learning.” The Computer Journal.
Hazimeh, Ponomareva, Mol, et al. 2020. The Tree Ensemble Layer: Differentiability Meets Conditional Computation.”
Hinton, Vinyals, and Dean. 2015. Distilling the Knowledge in a Neural Network.” arXiv:1503.02531 [Cs, Stat].
Iranzad, Liu, Chaovalitwongse, et al. 2021. Boost-S: Gradient Boosted Trees for Spatial Data and Its Application to FDG-PET Imaging Data.”
Johnson, and Zhang. 2014. Learning Nonlinear Functions Using Regularized Greedy Forest.” IEEE Transactions on Pattern Analysis and Machine Intelligence.
Kapelner, and Bleich. 2016. bartMachine: Machine Learning with Bayesian Additive Regression Trees.” Journal of Statistical Software.
Lakshminarayanan, Roy, and Teh. 2014. Mondrian Forests: Efficient Online Random Forests.” In Advances in Neural Information Processing Systems 27.
Le, and Clarke. 2022. Model Averaging Is Asymptotically Better Than Model Selection For Prediction.” Journal of Machine Learning Research.
Mason, Baxter, Bartlett, et al. 1999. “Boosting Algorithms as Gradient Descent.” In Proceedings of the 12th International Conference on Neural Information Processing Systems. NIPS’99.
Meinshausen. 2006. Quantile Regression Forests.” Journal of Machine Learning Research.
Mentch, and Zhou. 2020. Randomization as Regularization: A Degrees of Freedom Explanation for Random Forest Success.” Journal of Machine Learning Research.
Minka. 2002. Bayesian Model Averaging Is Not Model Combination.”
Nock, and Henecka. 2020. Boosted and Differentially Private Ensembles of Decision Trees.” arXiv:2001.09384 [Cs, Stat].
Rahimi, and Recht. 2009. Weighted Sums of Random Kitchen Sinks: Replacing Minimization with Randomization in Learning.” In Advances in Neural Information Processing Systems.
Ramchandran, and Mukherjee. 2021. On Ensembling Vs Merging: Least Squares and Random Forests Under Covariate Shift.” arXiv:2106.02589 [Math, Stat].
Schapire, Freund, Bartlett, et al. 1998. Boosting the Margin: A New Explanation for the Effectiveness of Voting Methods.” The Annals of Statistics.
Scornet. 2014. On the Asymptotics of Random Forests.” arXiv:1409.2090 [Math, Stat].
Scornet, Biau, and Vert. 2014. Consistency of Random Forests.” arXiv:1405.2881 [Math, Stat].
Shotton, Sharp, Kohli, et al. 2013. Decision Jungles: Compact and Rich Models for Classification.” In NIPS.
Shwartz-Ziv, and Armon. 2021. Tabular Data: Deep Learning Is Not All You Need.” arXiv:2106.03253 [Cs].
Zhang, Si, and Hsieh. 2017. GPU-Acceleration for Large-Scale Tree Boosting.” arXiv:1706.08359 [Cs, Stat].