8.16 Bagging (continued)

  • Cue the bootstrap, i.e., take repeated samples from the single training set

  • Generate B different bootstrapped training data sets

  • Then train our method on the bth bootstrapped training set to get ˆfb, the prediction at a point x

  • Average all the predictions to obtain ˆfbag(x)=1BBb=1ˆfb(x)

  • In the case of classification trees:

    • for each test observation:

      • record the class predicted by each of the B trees

      • take a majority vote: the overall prediction is the most commonly occurring class among the B predictions

NOTE: the number of trees B is not a critical parameter with bagging - a large B will not lead to overfitting