Returns the random forest variable importance based on the permutation accuracy measure, which is calculated as the difference in mean squared error between the original data and from randomly permuting the values of a variable.

varImpCoeff(forest, removeIntercept = TRUE, method = "oob")

Arguments

forest

a random forest, generated from splineForest()

removeIntercept

a boolean value, TRUE if you want to exclude the intercept in the calculations, FALSE otherwise.

method

the method to be used. This must be one of "oob" (out of bag), "all", "itb" (in the bag).

Value

a matrix of variable importance metrics.

Examples

importanceMatrix <- varImpCoeff(forest, removeIntercept=TRUE)
#> [1] "working on tree" #> [1] 1 #> [1] 2 #> [1] 3 #> [1] 4 #> [1] 5 #> [1] 6 #> [1] 7 #> [1] 8 #> [1] 9 #> [1] 10