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:
- draw m of the p features out of a hat (here p = 2); only those are eligible for this node,
- list all possible rules on the eligible feature(s),
- score every rule and pick the best,
- 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)