varImpRanger: varImpRanger

Description Usage Arguments Value Examples

View source: R/varImpRanger.R

Description

Computes the variable importance for ranger models and for arbitrary measures from the 'measures' package.

Usage

1
varImpRanger(object, data, target, nperm = 1, measure = "multiclass.Brier")

Arguments

object

An object as returned by cforest. ranger with option keep.inbag = TRUE.

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

1
2
3
4
5
6
7
## 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)

varImp documentation built on July 1, 2020, 7:03 p.m.