[R] RandomForest - getTree status code

Liaw, Andy andy_liaw at merck.com
Mon Dec 7 14:46:24 CET 2009


Is that the entire tree?  If so there's a problem.  The node status is
defined as follows in rf.h of the source code:

#define NODE_TERMINAL -1
#define NODE_TOSPLIT  -2
#define NODE_INTERIOR -3

i.e., "-3" means "non-terminal" node.

Andy
 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of NCS
> Sent: Friday, December 04, 2009 4:53 PM
> To: r-help at r-project.org
> Subject: [R] RandomForest - getTree status code
> 
> 
> What does a status value of -3 mean when I do a regression 
> with RF and use the getTree function?
> 
>      left daughter right daughter split var  split point 
> status prediction
> 1                2              3        11 4.721000e+03     
> -3 15.8489576
> 2                4              5         5 6.500000e+00     
> -3 11.3240895
> 3                6              7        10 6.790674e+02     
> -3 23.7250079
> 4                8              9        11 1.562500e+03     
> -3  9.6885129
> 5               10             11         7 7.085000e+02     
> -3 15.2126457
> 6               12             13         3 1.105000e+02     
> -3 22.3736330
> 7               14             15        11 2.249400e+04     
> -3 37.9011956
> 8               16             17         2 6.805105e+00     
> -3  5.0804247
> 9               18             19         7 6.775000e+02     
> -3 11.9877469
> 10              20             21         5 1.450000e+01     
> -3 12.6068710
> 
> Thanks
> ncs
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
Notice:  This e-mail message, together with any attachme...{{dropped:10}}




More information about the R-help mailing list