plotNull {rfPermute} | R Documentation |
Plot Random Forest Importance Null Distributions
Description
Plot the Random Forest null distributions importance metrics,
observed values, and p-values for each predictor variable from the
object produced by a call to rfPermute
.
Usage
plotNull(
x,
preds = NULL,
imp.type = NULL,
scale = TRUE,
plot.type = c("density", "hist"),
plot = TRUE
)
Arguments
x |
An object produced by a call to |
preds |
a character vector of predictors to plot. If |
imp.type |
A character vector giving the importance metric(s) to plot. |
scale |
Plot importance measures scaled (divided by) standard errors? |
plot.type |
type of plot to produce: |
plot |
display the plot? |
Details
The function will generate an plot for each predictor, with facetted importance metrics. The vertical red line shows the observed importance score and the _p_-value is given in the facet label.
Value
A named list of the ggplot
figures produced is invisibly returned.
Author(s)
Eric Archer eric.archer@noaa.gov
Examples
# A regression model using the ozone example
data(airquality)
ozone.rp <- rfPermute(
Ozone ~ ., data = airquality, ntree = 100,
na.action = na.omit, nrep = 50, num.cores = 1
)
# Plot the null distributions and observed values.
plotNull(ozone.rp)