rfPermute (version 2.1.81)

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 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.

See Also

rfPermute, rp.importance

Examples

Run this code
# NOT RUN {
# 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))

# }

Run the code above in your browser using DataLab