[R] "rpart": how to use each variable only once?

Shi, Tao shidaxia at yahoo.com
Fri May 14 19:23:46 CEST 2010

Hi list,

Is there a way in "rpart" to force the variables only used once when doing the splits?

This is how the question came about.  Often time, the tree constructed uses the same variable (say X1) for the first and second splits, for example.  However, due to practical reason, the researcher doesn't like this.  The prefer to see the second split using other variables (say X2).  Therefore the question.  I understand the performance will suffer.  However if there is a performance improvement for the tree with X1 as 1st split and X2 as 2nd split comparing the tree with one single split using X1, I guess it's still a reasonable thing to do, right? 

Many thanks!


More information about the R-help mailing list