Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can "splitting attribute" appear many times in decision tree?

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?

like image 370
yvetterowe Avatar asked Nov 15 '13 03:11

yvetterowe


2 Answers

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.

like image 88
Has QUIT--Anony-Mousse Avatar answered Sep 20 '22 06:09

Has QUIT--Anony-Mousse


  1. 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.

  2. Binary attributes shouldn't appear twice in the same brunch, that would be redundant. However, continuous attributes can appear in same branch several times.

like image 34
sashkello Avatar answered Sep 24 '22 06:09

sashkello