Skip to content
Financial Machine Learning / Nonparametric and Tree-Based Methods

Bagging and Random Forests

The previous lesson confronted a single decision tree's high variance directly by pruning it — trading away flexibility for stability. This note takes the opposite tack: keep the trees large and unpruned (low bias, high variance), and cancel out the variance by averaging many of them. This is the idea behind bagging and its refinement, the random forest — the single most widely deployed model family in tabular alpha research, and the direct analogue of every earlier lesson's bias–variance trade-off, now resolved by ensembling rather than by shrinkage or pruning.

In this lesson

  1. Learning objectives
  2. Bagging: bootstrap aggregation
  3. Out-of-bag error estimation
  4. Random forests: decorrelating the trees
  5. Worked example

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Financial Machine Learning syllabus.