plot_importance | R Documentation |
Plot variable importance
plot_importance(object)
object |
an object output by |
A ggplot2 object.
Other variable importance functions:
importance()
,
summarise_importance()
# fit a model on five bootstraps
m <- resample_boot(mtcars, 5) %>%
xgb_fit(resp="mpg", expl=c("cyl", "hp", "qsec"),
eta=0.1, max_depth=4, nrounds=20)
# compute variable importance for each model
m <- importance(m)
# look at importance for the first resample
m$importance[[1]]
# summarise across resamples
summarise_importance(m)
# plot the summarised importance
plot_importance(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.