Lesson 5 of 6 9 min · 128 words
Random forests
Bagged trees with random feature subsets.
A random forest is bagging with one extra twist: at each split, the tree may only consider a random subset of features (typically for classification, for regression).
This decorrelates the trees. In plain bagging, if one feature is very strong, every tree splits on it first and the trees end up similar. Forcing different features lowers in the variance formula, so averaging helps more.
Random forests are one of the best out-of-the-box methods for tabular data: accurate, robust to noise and outliers, little tuning needed, no feature scaling, and they give feature importances (how much each feature reduces impurity across all trees).
Formula to remember
Entropy
0 for a pure node, 1 bit for a 50/50 split.
Quick check · +5 XP