importance.icrf: 'Extract variable importance measure'

View source: R/importance.R

importance.icrfR Documentation

'Extract variable importance measure'

Description

'This is the extractor function for variable importance measures as produced by' icrf. (Quoted statements are from randomForest by Liaw and Wiener unless otherwise mentioned.)

Usage

importance(x, ...)

## Default S3 method:
importance(x, ...)

## S3 method for class 'icrf'
importance(x, type = NULL, ...)

Arguments

x

'an object of class' icrf

...

'not used'

type

either 1, 2, 3, or any combination of them, 'specifying the type of importance measure' (1 = mean increase in IMSE1, 2 = mean increase in IMSE2, 3 = mean decrease in node impurity). If not specified, all available types of importances are returned.

Details

'Here are the definitions of the variable importance measures. The first two measures are computed from permuting OOB data: For each tree, the prediction error on the out-of-bag portion of the data is recorded' (IMSE1 and IMSE2). 'Then the same is done after permuting each predictor variable.' 'The difference between the two are then averaged over all trees' The normalization by the standard deviation of the differences is not supported in this version. The third measure 'is the total decrease in node impurities from splitting on the variable, averaged over all trees.' 'For regression, it is measured by residual sum of squares.'

Value

An array of importance measure matrices, one row for each predictor variable.' Each column corresponds to the forest iteration. Each matrix corresponds to the type of the measure.

Author(s)

Hunyong Cho, Nicholas P. Jewell, and Michael R. Kosorok.

Cho H., Jewell N. J., and Kosorok M. R. (2020+). "Interval censored recursive forests"

See Also

icrf, varImpPlot

Examples

# rats data example.
# Note that this is a toy example. Use a larger ntree and nfold in practice.
data(rat2)

set.seed(1)
rats.icrf <-
  icrf(~ dose.lvl + weight + male + cage.no, data = rat2,
       data.type = "currentstatus", currentstatus.label = c("survtime", "tumor"),
       returnBest = TRUE, ntree=10, nfold=3)
importance(rats.icrf)




icrf documentation built on Oct. 30, 2022, 1:05 a.m.

Related to importance.icrf in icrf...