How can I determine the number of segments my data should be divided into? Are there any rules behind the number of bins data should be segmented into using the classification trees?
 A: Found a nice article that deals with this exact problem:
https://www.cs.princeton.edu/courses/archive/spring07/cos424/scribe_notes/0220.pdf
There are two general methods of controlling the size of the tree:
• grow the tree more carefully and try to end the growing process at an appropriate point early on
• grow the biggest tree possible (one that completely fits the data), then prune it to be smaller (this is the more common method)
One common technique is to separate the training set into two parts, the growing set and
the pruning set. The tree is grown using only the growing set, and the pruning set is used to estimate the testing error of all possible subtrees that can be built, and the subtree with the lowest error on the pruning set is chosen as the decision tree. In this method, we are using the pruning set as a proxy for the testing set with the hope of achieving a curve similar to the test curve when using the pruning set. For an example, 2/3 of the training set may be used for growing, while 1/3 is used for pruning. A disadvantage of this method is that
training data is wasted, a serious problem if the dataset is small.
