varImpRanger {varImp} | R Documentation |
varImpRanger
Description
Computes the variable importance for ranger models and for arbitrary measures from the 'measures' package.
Usage
varImpRanger(object, data, target, nperm = 1, measure = "multiclass.Brier")
Arguments
object |
An object as returned by cforest. |
data |
Original data that was used for training the random forest. |
target |
Target variable as used in the trained model. |
nperm |
The number of permutations performed. |
measure |
The name of the measure of the 'measures' package that should be used for the variable importance calculation. |
Value
Vector with computed permutation importance for each variable.
Examples
## 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
## End(Not run)
[Package varImp version 0.4 Index]