Last chance! 50% off unlimited learning
Sale ends in
Computes the variable importance for ranger models and for arbitrary measures from the 'measures' package.
varImpRanger(object, data, target, nperm = 1, measure = "multiclass.Brier")
An object as returned by cforest. ranger
with option keep.inbag = TRUE
.
Original data that was used for training the random forest.
Target variable as used in the trained model.
The number of permutations performed.
The name of the measure of the 'measures' package that should be used for the variable importance calculation.
Vector with computed permutation importance for each variable.
# NOT RUN {
library(ranger)
iris.rg = ranger(Species ~ ., data = iris, keep.inbag = TRUE, probability = TRUE)
vimp.ranger = varImpRanger(object = iris.rg, data = iris, target = "Species")
vimp.ranger
# }
Run the code above in your browser using DataLab