displaying variable in plot(varImp(randomForest_model))

556 Views Asked by At

varImpPlot(randomforest_model) in randomForest displays default 30 top variables. How do I display selected top variable only. for eg say top 18 .

1

There are 1 best solutions below

0
On

I figured this out. Needed to use n.var to display number of variables

varImpPlot(rf_fit,scale=TRUE,n.var=18)