Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 204798

function importance for randomForest package

$
0
0

I wanted to use the Random Forest to find the most important features for a classification problem (I have two classes: 0 and 1).

I created the model:

rf = randomForest(y  ~ ., data = df, sampsize=100000,ntree=100, importance = TRUE, keep.forest = FALSE)

And then I used the following to check the importance:

importance(rf, type = 1, class = 1)

I read that the class parameter can be used for a classification problem. My question is if I have to sort the results by their absolute value in Mean Decrease accuracy. When I use the VarImpPlot seems that I should consider also the negative values. And what exactly does the parameter class = 1?


Viewing all articles
Browse latest Browse all 204798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>