Learn R Programming

MachineShop (version 1.1.0)

varimp: Variable Importance

Description

Calculate measures of the relative importance of predictors in a model.

Usage

varimp(object, scale = TRUE, ...)

Arguments

object

MLModelFit object from a model fit.

scale

logical indicating whether importance measures should be scaled to range from 0 to 100.

...

arguments passed to model-specific variable importance functions.

Value

VarImp class object.

See Also

fit, plot

Examples

Run this code
# NOT RUN {
## Survival response example
library(survival)
library(MASS)

gbmfit <- fit(Surv(time, status != 2) ~ sex + age + year + thickness + ulcer,
              data = Melanoma, model = GBMModel)
(vi <- varimp(gbmfit))
plot(vi)

# }

Run the code above in your browser using DataLab