# Bagged Trees Algorithm

(Redirected from bagged trees)
• The training algorithm for random forests applies the general technique of bootstrap aggregating, or bagging, to tree learners. Given a training set X = x1, …, xn with responses Y = y1, …, yn, bagging repeatedly selects a random sample with replacement of the training set and fits trees to these samples … After training, predictions for unseen samples x' can be made by averaging the predictions from all the individual regression trees on x': :$\hat{f} = \frac{1}{B} \sum_{b=1}^B \hat{f}_b (x')$ or by taking the majority vote in the case of decision trees.