[R] rpart

Weiwei Shi helprhelp at yahoo.com
Tue Jan 18 00:27:31 CET 2005


Hi, there:
I am working on a classification problem by using
rpart. when my response variable y is binary, the
trees grow very fast, but if I add one more case to y,
that is making y has 3 cases, the tree growing cannot
be finished.
the command looks like:
x<-rpart(r0$V142~.,data=r0[,1:141],
parms=list(split='gini'), cp=0.01)

changing cp or removing parms does not help. 

summary($V142) gives like:
> summary(r0$V142)
  0   1   2 
370  14  16 

I am not sure if rpart can do this or there is
something wrong with my approach.

Please be advised.

Ed




More information about the R-help mailing list