importance_plot make a graph of variable importance
importance_plot(x, ...)
a ggplot plot of the variable importance
takes an `rpart` or `gbm.step` fitted object and makes a plot of variable importance
## Not run: ------------------------------------ # # an rpart object # library(rpart) # library(treezy) # fit.rpart <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis) # # importance_plot(fit.rpart) # # # you can even use piping # # fit.rpart %>% importance_plot # # # a randomForest object # # set.seed(131) # ozone.rf <- randomForest(Ozone ~ ., data=airquality, mtry=3, # importance=TRUE, na.action=na.omit) # print(ozone.rf) # ## Show "importance" of variables: higher value mean more important: # importance(ozone.rf) # # ## use importance_table # # importance_table(ozone.rf) # # # now plot it # # importance_plot(ozone.rf) # ## ---------------------------------------------