My question is about a binary decision tree (binary to integer).
Is there any problem if the conditions defined on a same variable ex. x1?
I mean when i define the variables for my tree, can I choose:
if(x1>3) then if (x1>4) then .... else .... end else .... end
as you see my variable is always x1, but the conditions are different.
In all binary decision tree that I find on the net the variable changes!
Best Answer
Yes, this is possible and happens frequently. Consider the tree page 4 of this tutorial, you'll see that multiple splits are made on both variables longitude and latitude. At each step of the CART algorithm, all predictors are tried and the best one (the one selected for splitting) is the one that maximizes the decrease in partition impurity (or some other metric), that's it. Then you take your child nodes and you split them again. And you iterate. There is absolutely nothing precluding repeated splits on the same predictor.
full link for the tutorial: http://www.stat.cmu.edu/~cshalizi/350/lectures/22/lecture-22.pdf