rf.imp.freq: Random Forest variable selection frequency

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

rf.imp.freqR Documentation

Random Forest variable selection frequency

Description

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

Usage

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

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


jeffreyevans/rfUtilities documentation built on Nov. 12, 2023, 6:52 p.m.