1

I received some code that I've plugged my data into and I'm not sure how to interpret the results.

regressor <- randomForest(response ~ . , data = predictors, importance=TRUE) # fit the random forest with default parameter

caret::varImp(regressor, conditional=TRUE) # conditional=True, adjusts for correlations between predictors

This is a small subset of my results:

          Overall
var1      6.8107556
var2      5.3135349
var3      5.5066138
var4      3.5830743
var5     -0.2476780
var6     -2.5929377

Am I correct to assume that the negative values mean that those variables are of low importance?

  • Check this post: [What does negative %IncMSE in RandomForest package mean?](https://stackoverflow.com/questions/27918320/what-does-negative-incmse-in-randomforest-package-mean/27920414#27920414) – Quinten Jul 26 '22 at 12:21
  • Does this answer your question? [What does negative %IncMSE in RandomForest package mean?](https://stackoverflow.com/questions/27918320/what-does-negative-incmse-in-randomforest-package-mean) – Michael Roswell Jul 26 '22 at 12:36
  • @Quinten I saw that before, but it's a different package so I wasn't sure if the answer also applies to my results. – gregor_samsa Jul 26 '22 at 12:46

1 Answers1

0

In your case, it shows a negative value, which shows that the MSE for the random variable worked worse compared to the MSE of the whole model. This shows that probably the variable is not predictive enough, so in other words, it is not important.

This post explains it more in-depth: What does negative %IncMSE in RandomForest package mean?.

Despite the fact that it is obtained with another package, the answer still applies to your results.

Wutruvic
  • 83
  • 7