Basic question about decision tree
I have read that when Building a tree, the tree is tested against Hold-out-Data (or Out-of-Bag Data?), well at least there must be some unseen test data from which the tree was no constructed, to see the performance of that tree, and also for Error pruning in the after, like in REP-Tree (Reduced-error-pruning), when the branches are tested against new testdata, and it is watched how it performs on the branches. If it does not perform well, lets say it could be overfitted. Then branches are pruned to make more general leaf nodes for better performance...
my question is, from where does it get the testdata / hold-out-data/ Out-of-bag data (or whatever it is called) ? How does it split the data for constructing the tree? I didnt read about that anywhere (also not in papers..?)