Building and Evaluating Ensemble Models in R
Instruction: Describe the process of building and evaluating ensemble models in R, including techniques like bagging, boosting, and stacking.
Context: This question assesses the candidate's knowledge of ensemble learning methods and their implementation in R for model improvement.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Bagging fits base learners on bootstrap samples and combines their predictions. Random forests add predictor subsampling to bagged trees. Boosting adds learners sequentially to improve an objective; gradient boosting uses loss gradients, rather than universally reweighting incorrectly classified cases. Stacking learns a combination of base predictions.
The critical stacking boundary is that each training prediction for the meta-model comes from a base learner that did not train on that row...