View source: R/selector.random.forest.R
random.forest.importance | R Documentation |
The algorithm finds weights of attributes using RandomForest algorithm.
random.forest.importance(formula, data, importance.type = 1)
formula |
a symbolic description of a model |
data |
data to process |
importance.type |
either 1 or 2, specifying the type of importance measure (1=mean decrease in accuracy, 2=mean decrease in node impurity) |
This is a wrapper for importance.
a data.frame containing the worth of attributes in the first column and their names as row names
Piotr Romanski
library(mlbench)
data(HouseVotes84)
weights <- random.forest.importance(Class~., HouseVotes84, importance.type = 1)
print(weights)
subset <- cutoff.k(weights, 5)
f <- as.simple.formula(subset, "Class")
print(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.