varimp | R Documentation |
Calculate measures of the relative importance of predictors in a model.
varimp(object, method = c("permute", "model"), scale = TRUE, ...)
object |
model fit result. |
method |
character string specifying the calculation of variable
importance as permutation-base ( |
scale |
logical indicating whether importance values should be scaled to a maximum of 100. |
... |
arguments passed to model-specific or permutation-based variable
importance functions. These include the following arguments and default
values for
|
VariableImportance
class object.
Fisher, A., Rudin, C., & Dominici, F. (2019). All models are wrong, but many are useful: Learning a variable's importance by studying an entire class of prediction models simultaneously. Journal of Machine Learning Research, 20, 1-81.
plot
## Requires prior installation of suggested package gbm to run
## Survival response example
library(survival)
gbm_fit <- fit(Surv(time, status) ~ ., data = veteran, model = GBMModel)
(vi <- varimp(gbm_fit))
plot(vi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.