Reputation: 21
I'm using the caret package in R to run both random forest and xgboost models. And I want to get the variable importance of all 65 variables. I've tried varimp() function, and it could give me variable importance of the top 20 variables. Is there any way or options that I could have them for all 65 variables?
Thank you!!!
Upvotes: 2
Views: 703
Reputation: 14316
It computes them all. If you are printing or plotting, there is an argument called top
that let's you control how many that are shown. The argument coming out of varImp
has them all. I could give more details if you show a small reproducible example.
Upvotes: 1