[R] rpart.object help

jagdeesh_mn jagz8595 at gmail.com
Mon Dec 13 08:58:38 CET 2010


Hi,

Suppose i have generated an object using the following :
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) 

And when i print fit, i get the following :

n= 81 

node), split, n, loss, yval, (yprob)
      * denotes terminal node

 1) root 81 17 absent (0.7901235 0.2098765)  
   2) Start>=8.5 62  6 absent (0.9032258 0.0967742)  
     4) Start>=14.5 29  0 absent (1.0000000 0.0000000) *
     5) Start< 14.5 33  6 absent (0.8181818 0.1818182)  
      10) Age< 55 12  0 absent (1.0000000 0.0000000) *
      11) Age>=55 21  6 absent (0.7142857 0.2857143)  
        22) Age>=111 14  2 absent (0.8571429 0.1428571) *
        23) Age< 111 7  3 present (0.4285714 0.5714286) *
   3) Start< 8.5 19  8 present (0.4210526 0.5789474) *

Is it possible to extract the splits alone as a matrix using rpart.object?
If so, how?

Regards,
Jagdeesh
-- 
View this message in context: http://r.789695.n4.nabble.com/rpart-object-help-tp3085054p3085054.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list