Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.rp.importance

Plot Random Forest Importance Distributions


Description

Plot the Random Forest importance distributions, with significant p-values as estimated in rfPermute.

Usage

## S3 method for class 'rp.importance'
plot(
  x,
  alpha = 0.05,
  sig.only = FALSE,
  type = NULL,
  n = NULL,
  main = NULL,
  ...
)

Arguments

x

An object produced by a call to rp.importance.

alpha

Critical alpha to identify "significant" predictors.

sig.only

Plot only the significant (<= alpha) predictors?

type

character vector listing which importance measures to plot. Can be class names or names of overall importance measures (e.g., "MeanDecreaseAccuracy") in the rp.importance object.

n

Plot n most important predictors.

main

Main title for plot.

...

Optional arguments which will be ignored.

Details

The function will generate a panel of plots, one for each importance type.

Author(s)

See Also

Examples

# A regression model using the ozone example
data(airquality)
ozone.rfP <- rfPermute(
  Ozone ~ ., data = airquality, ntree = 100, 
  na.action = na.omit, nrep = 50, num.cores = 1
)
  
# Plot the unscaled importance distributions and highlight significant predictors
plot(rp.importance(ozone.rfP, scale = FALSE))
  
# ... and the scaled measures
plot(rp.importance(ozone.rfP, scale = TRUE))

rfPermute

Estimate Permutation p-Values for Random Forest Importance Metrics

v2.1.81
GPL (>= 2)
Authors
Eric Archer [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.