fastimp-methods: Compute Fast (Gini) Variable Importance

Description Usage Arguments Value Methods References See Also Examples

Description

Calculates variable importance using a fast method, by adding up the decreases in Gini impurity for each variable over all trees. The results are often consistent with the full variable importance calculated with varimp.

Usage

1
2
## S4 method for signature 'bigcforest'
fastimp(forest)

Arguments

forest

A random forest of class "bigcforest".

Value

A numeric vector containing the fast (Gini) variable importance measures for each variable.

Methods

signature(forest = "bigcforest")

Compute the fast (Gini) variable importance for a classification random forest.

References

Breiman, L. (2001). Random forests. Machine learning, 45(1), 5-32.

Breiman, L. & Cutler, A. (n.d.). Random Forests. Retrieved from http://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm.

See Also

varimp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Classify cars in the Cars93 data set by type (Compact, Large,
# Midsize, Small, Sporty, or Van).

# Load data.
data(Cars93, package="MASS")
x <- Cars93
y <- Cars93$Type

# Select variables with which to train model.
vars <- c(4:22)

# Run model, grow 30 trees.
forest <- bigrfc(x, y, ntree=30L, varselect=vars, cachepath=NULL)

# Calculate variable importance, including those for each out-of-bag example.
fastimportance <- fastimp(forest)

gboris/bigrf documentation built on May 16, 2019, 10:14 p.m.