Skip to content

Random Forest

An ensemble method consisting of many decision trees. It combines two sources of randomness: different training samples and a random set of features when choosing a split.

How it is arranged

  1. Several trees are trained.
  2. Each tree is built on its own bootstrap sample.
  3. When searching for a node split, a random subset of features is considered rather than all features at once.
  4. The predictions are combined: by voting for classification, by averaging for regression.

Why randomness in features is needed

If one feature is very informative, almost every tree will pick it for the top split — and the trees will turn out similar. A random subset of features forces the trees to build different structures, reduces their similarity, and increases the benefit of combining them.

Relation to bagging

Bagging is a more general idea: training on bootstrap samples with the combination of predictions, applicable to different base models. Random Forest is a concrete algorithm that adds randomness in the choice of features on top of it.

Limitations

  • More computation and memory are required than for a single tree.
  • The final prediction is harder to explain than the rule of a single tree.
  • The bias of the base trees is not removed: the method reduces mainly the variance.
  • The improvement is not considered automatic: quality is compared with a strong single model on data that was not used in training.

See also

← All terms