The variance a single tree cannot lose
Averaging independent estimators each with variance divides the variance by , and that is the whole idea a forest is built on.
- : the number of trees.
- : the variance of one tree.
- : the correlation between two trees in the forest.
The second term vanishes as you add trees. The first does not, and it is that sets the floor.
So a forest is not built by growing more trees. It is built by making the trees disagree.
The two sources of disagreement
Bagging gives each tree a bootstrap sample drawn with replacement, so each tree sees about 63 percent of the data and misses the rest.
Feature subsampling is the stronger one: at every split each tree may only consider features out of , chosen at random.
Without it one dominant feature is picked first by every tree and stays high, which is exactly what bagging alone fails to fix.
One forest, in order
- Draw a bootstrap sample of size from the training set.
- Grow a tree on it, choosing random features at each split.
- Grow that tree deep, with no pruning.
- Repeat for all trees.
- Predict by majority vote across trees, or by averaging for regression.
The error estimate that costs nothing
Each sample was left out of about a third of the trees, so those trees can predict it as though it were unseen.
The out-of-bag error is a validation score obtained from the training run itself, close to what k-fold cross-validation would report, at no extra cost.
Why individual trees are left unpruned
A single deep tree overfits because its variance is high, and variance is the one thing averaging removes.
Pruning would lower each tree's variance and raise its bias, and bias is what averaging cannot touch.
So the forest takes low-bias, high-variance trees on purpose and spends the averaging on the half of the problem it can solve.