Skip to content

ariable Importance Measure in Package RandomForest

3 messages · linuxkaffee at gmx.net, Uwe Ligges, Liaw, Andy

#
Hi,

I've a question about the RandomForest package.

The package allows the extraction of a variable importance measure. As far as
I could see from the documentation, the computation is based on the Gini index.

Do you know if this extraction can be also based on other criteria? In particular,
I'm interested in the info gain criterion.

Best regards,
Chris
--
1 day later
#
Given you do not want to touch the randomForest implementation itself, 
the answer is "no, there is no particular function to do it in package 
randomForest. More particular:

?randomForest tells us that a value "importance" is returned that is `a 
matrix with nclass + 2 (for classification) or two (for regression) 
columns. For classification, the first nclass columns are the 
class-specific measures computed as mean descrease in accuracy. The 
nclass + 1st column is the mean descrease in accuracy over all classes. 
The last column is the mean decrease in Gini index. For Regression, the 
first column is the mean decrease in accuracy and the second the mean 
decrease in MSE. If importance=FALSE, the last measure is still returned 
as a vector.'

So as far as I can see, you would have to change randomForest itself 
that has to return some relevant values in order to calculate the 
criterion(s) you are interested in.

Best wishes,
Uwe Ligges
linuxkaffee at gmx.net wrote:
#
The randomForest package is based on Breiman & Cutler's original code,
which grows trees using the CART algorithm.  The Gini criterion for
splitting nodes is hard-coded in the Fortran.  If you want info gain as
measure of variable importance, you should be growing trees using that
as the splitting criterion.  It may (or may not) be possible with the
party package, as that's a more modular design.  That's something you
can look into.

Best,
Andy 

From:  Uwe Ligges
Notice:  This e-mail message, together with any attachme...{{dropped:12}}