I am trying to code my own, simple version of RandomForest function in R for learning purposes. However I have a hard time understanding the concept of the out-of-bag error.
Is it simply done by computing for each tree the error on sample not seen during training? So for example if my tree was build of 60% of dataset, I compute the error on remaining 40% of dataset, I repeat that logic for each tree and average the results?
Or am I misunderstanding something?
[Edit] My confusion comes from this definition:
Because this definition seems different to what my intuition says.