rf.imp.freq: Random Forest variable selection frequency

Description Usage Arguments Value Note Author(s) Examples

View source: R/rf.imp.freq.R

Description

Evaluates the frequency that an independent variables are selected greater-than/equal-to defined importance threshold

Usage

1
rf.imp.freq(x, p = 0.6, plot = TRUE)

Arguments

x

random forest object

p

Threshold of row standardized importance values

plot

Plot frequencies (TRUE/FALSE)

Value

A list class object with the following components: frequency: vars - names of independent variables used in model global - if a variable greater-than/equal-to importance threshold, else NA column for each class where greater-than/equal-to importance threshold, else NA var.freq - frequency a variable is selected for global and local importance >= importance threshold

importance: Standardized importance matrix from randomForest model

Note

Evaluates the number of times a variable is selected greater-than/equal-to defined threshold (p) for the global and local (class level) importances. This allow one to evaluate if a given variable is important to the overall model or specific classes.

Author(s)

Jeffrey S. Evans <jeffrey_evans<at>tnc.org>

Examples

1
2
3
4
5
 
 require(randomForest)
 data(iris)
 iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE)
 rf.imp.freq(iris.rf, p = 0.30)

rfUtilities documentation built on Oct. 3, 2019, 9:04 a.m.