rfPermute (version 2.1.81)

rp.importance: Extract rfPermute Importance Scores and p-values.

Description

Extract a matrix of the observed importance scores and p-values from the object produced by a call to rfPermute

Usage

rp.importance(x, scale = TRUE, sort.by = NULL, decreasing = TRUE)

Arguments

x

An object produced by a call to rfPermute.

scale

For permutation based measures, should the measures be divided their "standard errors"?

sort.by

character vector giving the importance metric(s) or p-values to sort by. If NULL, defaults to "MeanDecreaseAccuracy" for classification models and "%IncMSE" for regression models.

decreasing

logical. Should the sort order be increasing or decreasing?

Details

p-values can be given to the sort.by argument by adding '.pval' to the column name of the desired column from the importance element of the rfPermute object.

See Also

rfPermute, plot.rp.importance

Examples

Run this code
# NOT RUN {
# A regression model using the ozone example
ozone.rfP <- rfPermute(
  Ozone ~ ., data = airquality, ntree = 100, 
  na.action = na.omit, nrep = 50, num.cores = 1
)
imp.unscaled <- rp.importance(ozone.rfP, scale = TRUE)
imp.unscaled
  
imp.scaled <- rp.importance(ozone.rfP, scale = TRUE)
imp.scaled

# }

Run the code above in your browser using DataLab