What is bootstrap sampling and why does a Random Forest use it?

Quick Overview

Asks what bootstrap sampling is and why a Random Forest trains each tree on its own bootstrap sample. Tests whether you can describe a bootstrap sample precisely, derive the fraction of rows it leaves out, and explain what resampling does for an ensemble of trees.

What is bootstrap sampling and why does a Random Forest use it?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is bootstrap sampling and why does a Random Forest use it? ```hint Think about what averaging needs Averaging many models only helps when they differ. Ask what the forest would look like if every tree were trained on exactly the same rows. ``` ### What a Strong Answer Covers - A precise definition of a bootstrap sample: its size, repeated rows and left-out rows. - The fraction of rows a bootstrap sample leaves out, and where that number comes from. - Why the forest uses it, and what it does to the ensemble's error. - Out-of-bag evaluation. - The cost in per-tree bias, and how bootstrap sampling relates to the forest's per-split feature sampling. ### Follow-up Questions - Why does a Random Forest also sample features at each split when the trees already see different rows? - How does the out-of-bag error compare with cross-validation error, and when would you stop trusting it? - What changes if you set `max_samples` to a small fraction of the data? - With a rare positive class, what can go wrong with plain bootstrap samples, and how would you adjust the sampling?

Overview: Asks what bootstrap sampling is and why a Random Forest trains each tree on its own bootstrap sample. Tests whether you can describe a bootstrap sample precisely, derive the fraction of rows it leaves out, and explain what resampling does for an ensemble of trees.

Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What is bootstrap sampling and why does a Random Forest use it?

What a Strong Answer Covers Guidance

  • A precise definition of a bootstrap sample: its size, repeated rows and left-out rows.
  • The fraction of rows a bootstrap sample leaves out, and where that number comes from.
  • Why the forest uses it, and what it does to the ensemble's error.
  • Out-of-bag evaluation.
  • The cost in per-tree bias, and how bootstrap sampling relates to the forest's per-split feature sampling.

Follow-up Questions Guidance

  • Why does a Random Forest also sample features at each split when the trees already see different rows?
  • How does the out-of-bag error compare with cross-validation error, and when would you stop trusting it?
  • What changes if you set max_samples to a small fraction of the data?
  • With a rare positive class, what can go wrong with plain bootstrap samples, and how would you adjust the sampling?