vimp: Variable Importance

Description Usage Arguments Value Examples

View source: R/vimp.R

Description

Calculate variable importance by recording the increase in error when a given predictor is randomly permuted. Regression forests uses mean squared error; competing risks uses integrated Brier score.

Usage

1
2
3
vimp(forest, newData = NULL, randomSeed = NULL, type = c("mean", "z",
  "raw"), events = NULL, time = NULL, censoringDistribution = NULL,
  eventWeights = NULL)

Arguments

forest

The forest that was trained.

newData

A test set of the data if available. If not, then out of bag errors will be attempted on the training set.

randomSeed

The source of randomness used to permute the values. Can be left blank.

events

If using competing risks forest, the events that the error measure used for VIMP should be calculated on.

time

If using competing risks forest, the upper bound of the integrated Brier score.

censoringDistribution

(Optional) If using competing risks forest, the censoring distribution. See integratedBrierScore for details.

eventWeights

(Optional) If using competing risks forest, weights to be applied to the error for each of the events.

Value

A named numeric vector of importance values.

Examples

1
2
3
4
5
6
data(wihs)

forest <- train(CR_Response(status, time) ~ ., wihs,
 ntree = 100, numberOfSplits = 0, mtry=3, nodeSize = 5)

vimp(forest, events = 1:2, time = 8.0)

jatherrien/largeRCRF documentation built on Nov. 15, 2019, 7:16 a.m.