rf.imp.freq | R Documentation |
Evaluates the frequency that an independent variables are selected greater-than/equal-to defined importance threshold
rf.imp.freq(x, p = 0.6, plot = TRUE)
x |
random forest object |
p |
Threshold of row standardized importance values |
plot |
Plot frequencies (TRUE/FALSE) |
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
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.
Jeffrey S. Evans <jeffrey_evans<at>tnc.org>
require(randomForest)
data(iris)
iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE)
rf.imp.freq(iris.rf, p = 0.30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.