At what point does increasing n_estimators stop improving Random Forest performance?

Quick Overview

Asks when adding more trees to a random forest stops improving performance and how you would find that point in practice. Tests understanding of variance reduction in bagged ensembles, out-of-bag error, and the compute cost of a larger forest.

At what point does increasing n_estimators stop improving Random Forest performance?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

At what point does increasing `n_estimators` stop improving Random Forest performance? `n_estimators` sets how many trees the forest grows and averages over. ```hint Variance of an average Write down the variance of the mean of $B$ predictors that each have variance $\sigma^2$ and pairwise correlation $\rho$. Which part of it does $B$ affect? ``` ```hint Measuring it cheaply Bootstrap sampling gives you an error estimate without a separate validation set. Think about how to grow the forest step by step without refitting it each time. ``` ### What a Strong Answer Covers - The shape of the error curve as trees are added, and roughly where it flattens - Why the curve plateaus, using the variance of an average of correlated trees - Whether adding trees can cause overfitting - Settings and outputs that need more trees than accuracy alone suggests - A practical way to find the stopping point, and the compute, memory and latency cost of going past it ### Follow-up Questions - How does lowering `max_features` change both the level of the plateau and the number of trees needed to reach it? - Why can OOB error look worse than test error when the forest has only a few trees? - A forest with 2,000 trees is too slow for online serving. What would you change? - Does gradient boosting behave the same way as the number of estimators grows?

Overview: Asks when adding more trees to a random forest stops improving performance and how you would find that point in practice. Tests understanding of variance reduction in bagged ensembles, out-of-bag error, and the compute cost of a larger forest.

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

At what point does increasing n_estimators stop improving Random Forest performance?

n_estimators sets how many trees the forest grows and averages over.

What a Strong Answer Covers Guidance

  • The shape of the error curve as trees are added, and roughly where it flattens
  • Why the curve plateaus, using the variance of an average of correlated trees
  • Whether adding trees can cause overfitting
  • Settings and outputs that need more trees than accuracy alone suggests
  • A practical way to find the stopping point, and the compute, memory and latency cost of going past it

Follow-up Questions Guidance

  • How does lowering max_features change both the level of the plateau and the number of trees needed to reach it?
  • Why can OOB error look worse than test error when the forest has only a few trees?
  • A forest with 2,000 trees is too slow for online serving. What would you change?
  • Does gradient boosting behave the same way as the number of estimators grows?