Sorry, but this is not a general question, so i am going to be as specific as i can. I have searched a lot, however i cant consider the following case in regression trees:
The following picture shows one node, which has 2 Samples. The black rectangles are the split nodes and the green circles are the leaf nodes
In each node, the split is made by using the SSE(Residual Sum Of Square Error)
I have problem in calculating the split, when the num of samples in a node is 2. This happens because the SSE calculates the mean values in each subtree of this node. So, the SSE will be always zero
(leftSubtreeError-meanLeft)^2 + (rightSubtreeError-meanRight)^2 = (leftSubtreeError-leftSubtreeError)^2 + (rightSubtreeError-rightSubtreeError)^2 = 0^2 + 0^2 = 0
Also each leaf node will always have 1 sample
The split is done according to 3 variables:
a. px1(height,width)
b. px2(height,width)
c. thres, where 1 <= thres <= 50
So, if the number of samples in a node is 2, does it make sense using the above split variables? no
Maybe i am missing some part of algorithm. Is there any exception in the algorithm?