01Chapter 1: Decision trees as the building blockA random forest is built from decision trees. This chapter covers what a decision tree is, how it makes predictions, how it is grown, and which properties of trees motivate the forest. Later chapters cover split criteria in detail, the bias and variance trade-off, and the forest itself.6 min read
02Chapter 2: How a tree picks its splitsThis chapter assumes you know what a decision tree looks like: a series of yes/no questions that ends in a leaf holding a prediction. It also assumes you know the vocabulary of classification and regression. Here you learn how the tree decides which question to ask at each node. That choice is the m6 min read
03Chapter 3: Why single trees overfit: bias and varianceThis chapter assumes you know how a decision tree picks splits (the previous chapter), what a train/test split is, and how to read accuracy and mean squared error. It explains why a fully grown tree scores almost perfectly on its training data and still predicts poorly on new data. It also sets up t7 min read
04Chapter 4: Bootstrap samplingThis chapter assumes you know what a training set is, can read basic NumPy, and have met decision trees and the idea of variance in a model. Bootstrap sampling is the first of the two sources of randomness in a random forest. It decides which rows each tree sees.6 min read
05Chapter 5: Bagging: training on resampled dataThis chapter assumes you know how a decision tree is grown and why a fully grown tree overfits (high variance). It also assumes you know what a bootstrap sample is: n rows drawn with replacement from n rows. You should be comfortable with NumPy and with scikit-learn's fit and predict interface.6 min read
06Chapter 6: Combining tree predictions by voting and averagingThis chapter covers the last step of the forest algorithm: how many trained trees become one prediction. It assumes you know how a single decision tree predicts, what a bootstrap sample is, and the basics of NumPy array shapes. It also assumes you know what the variance of a sum of random variables 6 min read
07Chapter 7: Random feature subsets decorrelate the treesThis chapter assumes you know how a decision tree picks splits with an impurity criterion. It also assumes you know what bootstrap sampling and bagging are, and that you can read basic Python and scikit-learn code. You should also be comfortable with the idea that averaging many noisy predictions re6 min read
08Chapter 8: The complete random forest algorithmThis chapter assembles the pieces from earlier chapters into one algorithm. It assumes you know how a decision tree picks splits, what bootstrap sampling is, and how bagging averages models. It also assumes you can read basic NumPy and scikit-learn code. Here you will see the full training and predi6 min read
09Chapter 9: Out-of-bag error as a built-in validation estimateThis chapter assumes you know how bootstrap sampling works, how a random forest combines trees by voting or averaging, and the difference between training and test error. It also assumes basic scikit-learn use. Here you will learn how a forest estimates its own generalization error without a separat6 min read
10Chapter 10: Tuning the main hyperparametersA random forest has a handful of settings that matter and many that rarely do. This chapter covers the ones that matter: the number of trees, the number of features tried per split, tree depth, and leaf size. It also covers how to search over them without fooling yourself.6 min read
11Chapter 11: A worked example with scikit-learnThis chapter puts the earlier ideas into one runnable workflow: split the data, train a forest, check it with the out-of-bag (OOB) score, compare it with a single tree, and tune the main settings. It assumes you know the following:5 min read
12Chapter 12: Interpreting feature importanceThis chapter assumes you can train a random forest in scikit-learn and know what out-of-bag (OOB) scoring and a held-out test set are. You should also be comfortable reading NumPy arrays. After a forest is fit, a common next question is which features drive its predictions. Scikit-learn gives you tw7 min read
13Chapter 13: Limitations and when to choose something elseRandom forests are a strong default for tabular data. They also have structural weaknesses, and knowing them tells you when to reach for another model. This chapter assumes you have read the earlier chapters on bagging, feature subsampling, out-of-bag (OOB) estimates, and feature importance. It also6 min read
14Chapter 14: Related methods: extremely randomized trees and boostingYou have read the earlier chapters on random forests. You know how bagging and random feature subsets work, and you can train a RandomForestClassifier in scikit-learn. You also know the bias-variance trade-off: variance is how much a model changes when the training data changes, and bias is the er5 min read