How does bagging reduce variance?
Reveal the answer and explore the explanation.
01EasyCoreHow does bagging reduce variance?
Answer
EasyCore
How does bagging reduce variance?
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 ↗