What is a Random Forest and how does it make a prediction?

Quick Overview

Asks what a Random Forest is and how it turns many decision trees into one prediction. Tests bootstrap and per-split feature sampling, majority voting versus averaged probabilities, regression averaging, and why decorrelated trees lower variance.

What is a Random Forest and how does it make a prediction?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is a Random Forest and how does it make a prediction? ```hint Two kinds of sampling Think about what is randomized when each tree is trained, then follow one new sample from the root of each tree to the final output. ``` ### What a Strong Answer Covers - The two sources of randomness during training: bootstrap rows and a random feature subset at each split - How a single tree produces its output, and how the forest combines outputs for classification and for regression - The difference between a hard majority vote and averaging predicted probabilities - Why averaging many decorrelated trees lowers variance without raising bias much - Practical properties such as out-of-bag error, parallel training and built-in feature importances ### Follow-up Questions - How does `max_features` trade off the strength of each tree against the correlation between trees? - What fraction of rows is left out of each bootstrap sample, and how is out-of-bag error computed from them? - Can adding more trees make a Random Forest overfit? - How does a Random Forest differ from gradient boosting in how the trees are built and combined?

Overview: Asks what a Random Forest is and how it turns many decision trees into one prediction. Tests bootstrap and per-split feature sampling, majority voting versus averaged probabilities, regression averaging, and why decorrelated trees lower variance.

General logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What is a Random Forest and how does it make a prediction?

What a Strong Answer Covers Guidance

  • The two sources of randomness during training: bootstrap rows and a random feature subset at each split
  • How a single tree produces its output, and how the forest combines outputs for classification and for regression
  • The difference between a hard majority vote and averaging predicted probabilities
  • Why averaging many decorrelated trees lowers variance without raising bias much
  • Practical properties such as out-of-bag error, parallel training and built-in feature importances

Follow-up Questions Guidance

  • How does max_features trade off the strength of each tree against the correlation between trees?
  • What fraction of rows is left out of each bootstrap sample, and how is out-of-bag error computed from them?
  • Can adding more trees make a Random Forest overfit?
  • How does a Random Forest differ from gradient boosting in how the trees are built and combined?