Skip to content

Variable importance in Random Forests

2 messages · Nagu, Liaw, Andy

#
Hi,

How do I get what splits were used for the top important variables.
For example, if my top most important variable is a continuous
variable, e.g. previous 12 month sales, and its range is between $0 to
$1M, how do I find what what were the split values for this variable
that were used in the random forests algorithm? How do I achieve the
same thing for a factor variable?

Thank you,
Nagu
#
Depending on the way you ran randomForest, the variable of interest may
have been used in many splits in many trees.  The information can be
extracted using the getTree() function.  However, I suspect it might be
more useful to look at partialPlot().

Best,
Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachme...{{dropped:15}}