All lessons in Machine Learning Engineering: Reliable Predictive Models

Bootstrap Sampling and Bagging

Derive out-of-bag membership and explain how averaging interacts with correlation.

30 minutes · Members lesson · preview

What you will learn

  • Construct a bootstrap sample and identify its omitted training rows.
  • Compute the variance of an average under a simple equal-correlation model.
  • Distinguish bagging's variance reduction from a guarantee of generalization.

A decision tree can change substantially when a few training rows change. Bagging builds several fitted models from resampled training sets and aggregates their predictions. The aim is to reduce sensitivity to one particular sample while retaining useful patterns. The resampling mechanism also creates the omitted rows used by out-of-bag evaluation.

The word bootstrap refers to sampling with replacement from an observed dataset. Replacement is essential: a row can be drawn more than once, while another is never drawn. A shuffled copy containing every row exactly once is not a bootstrap sample.

Choose another lesson