Just want to clarify one thing: the same attribute can appear in decision tree for many times as long as they are in different "branches" right?
For obvious reasons, it does not make sense to use the same decision within the same branch.
On different branches, this reasoning obviously does not hold.
Consider the classic XOR(x,y) problem. You can solve it with a two layer decision tree, but you will need to split on the same attribute in both branches.
If x is true:
If y is true: return false
If y is false: return true
If x is false:
If y is true: return true
If y is false: return false
Another example is the following: assume your data is positive in x=[0;1], and negative outside. A good tree would be the following:
If x > 1: return negative
If x <= 1:
If x >= 0: return positive
If x < 0: return negative
It's not the same decision, so it can make sense to use x twice.
In general , you can do whatever you want, as long as you keep a structure of a "tree". They can be customized in many ways and while there can be redundancy it doesn't undermine its validity.
Binary attributes shouldn't appear twice in the same brunch, that would be redundant. However, continuous attributes can appear in same branch several times.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With