Fitting One Tree of a Random Forest

This fits a tree in a random forest ensemble. Before growing the tree, draw a bootstrap copy of the data (n rows with replacement). Then at each node:

  1. draw m of the p features out of a hat (here p = 2); only those are eligible for this node,
  2. list all possible rules on the eligible feature(s),
  3. score every rule and pick the best,
  4. split the data through it, and repeat on both halves until a stop condition is met.
A forest is many such trees; here you grow them one at a time.

the current region (in the bootstrap copy)

criterion score of every candidate rule on the drawn feature(s)

the growing tree