To tune or not to tune the number of trees in random forest?

Philipp Probst, Anne-Laure Boulesteix
5/16/2017
494 citations
stat.MLcs.LG

Official code: PhilippPro/OOBCurve (9 stars, R, last commit 2018-08-30).

Abstract

The number of trees T in the random forest (RF) algorithm for supervised learning has to be set by the user. It is controversial whether T should simply be set to the largest computationally manageable value or whether a smaller T may in some cases be better.

Show full abstract

While the principle underlying bagging is that "more trees are better", in practice the classification error rate sometimes reaches a minimum before increasing again for increasing number of trees. The goal of this paper is four-fold: (i) providing theoretical results showing that the expected error rate may be a non-monotonous function of the number of trees and explaining under which circumstances this happens; (ii) providing theoretical results showing that such non-monotonous patterns cannot be observed for other performance measures such as the Brier score and the logarithmic loss (for classification) and the mean squared error (for regression); (iii) illustrating the extent of the problem through an application to a large number (n = 306) of datasets from the public database OpenML; (iv) finally arguing in favor of setting it to a computationally feasible large number, depending on convergence properties of the desired performance measure.

View on arXivView PDF

Code Implementations(1)

Random Forest OOB Curves for any performance measure of mlr

91RJan 25, 20178 years ago

Similar Papers

Cite this paper

@article{probst2017tune,
  title  = {To tune or not to tune the number of trees in random forest?},
  author = {Philipp Probst and Anne-Laure Boulesteix},
  year   = {2017},
  eprint = {1705.05654},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1705.05654}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1705.05654.svg)](https://codeofpaper.com/paper/1705.05654)

Discussion