QUESTION 1 OF 10

How does bagging reduce variance?

Reveal the answer and explore the explanation.

01
EasyCore

How does bagging reduce variance?

Answer
Answer

Fits multiple estimators on resampled data and aggregates their predictions.

Practical example

Train trees on bootstrap samples to reduce prediction variance.

PythonRelated concept example
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier(n_estimators=100, random_state=42)
# Fit and compare on the same splits as a single tree.

Randomized trees are combined by averaging class probabilities in scikit-learn.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As