简体   繁体   中英

How to interpret negative values in varImp output from caret package?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM