The same 16 days 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
The red circles are days when the ice cream sold out, the blue squares days when it did not. As in the decision tree topic, but this time we build many trees instead of one.
A single deep tree 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
The regions of a single tree of depth 3. It classifies a share of 1 of the training days right, yet moving one day a little can change the regions a lot. A single tree is unstable.
A bootstrap sample 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
16 draws are made from the 16 days with replacement: the same day can come several times. This sample has 11 different days; 5 days were never drawn and look faded.
A tree from the sample 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
The regions of the tree built on this sample. Since every sample differs, every tree comes out a little different; each one overfits different days.
The vote of 15 trees 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
15 trees were built from 15 samples. For every point of the chart the trees vote and the majority wins. The ensemble's training accuracy is 1. The errors the trees make on their own cancel out in the vote.
New day: sold out 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
26 degrees, 6 hours of sun. 9 of the 15 trees say sold out; the decision is sold out.
Random forests and boosting 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
A random forest adds one step to bagging: at each split only a random part of the features is looked at, so the trees are less alike. Gradient boosting builds the trees in sequence instead; each new tree tries to fix the errors of the ones before.
Why it matters 8 12 16 20 24 28 32 36 0 2 4 6 8 10 12 temperature, degrees sunny hours
On tabular data, random forests and gradient boosting, such as XGBoost and LightGBM, are among the methods that win most often today. The wisdom of crowds: many models that make independent errors are more reliable than one.