Definition

Random forest constructs a multitude of de-correlated decision trees at training time and make a prediction through Bagging.

Algorithm

  1. For :
    1. Draw a size bootstrap sample from training data.
    2. Grow a random-forest tree to the bootstrapped data, by recursively repeating the following steps for each terminal node of the tree, until the minimum node size is reached.
      1. Select variables at random.
      2. Pick the best variable and split point among the selected variables.
      3. Split the node into two children nodes.
  2. Output the ensemble of trees to make a prediction at a new point
    • Regression:
    • Classification: where is the class prediction of the th random-forest tree.

Facts

Selection of hyperparameter is recommended as

  • For classification:
  • For regression: