As I understand it, if you fit a random forest with 100 trees, we can calculate a cumulative out of bag error by
making 100 sub forests, each contained within another, such that the first forest contains the first tree, the second contains the first tree + second tree, and so on...
Calculate the out of bag error for each of these forests.
I don't understand why we would do this. Is it to determine the optimal number of trees by finding the number of trees such that the out of bag error is no longer decreasing?
EDIT: Here are two implementations within Matlab and R: