Usage
## S3 method for class 'randomForest':
partialPlot(x, pred.data, x.var, which.class,
add = FALSE, n.pt = min(length(unique(pred.data[, xname])), 51),
rug = TRUE, xlab=deparse(substitute(x.var)), ylab="",
main=paste("Partial Dependence on", deparse(substitute(x.var))),
...)
Arguments
x
an object of class randomForest
, which contains a
forest
component.
pred.data
a data frame used for contructing the plot, usually
the training data used to contruct the random forest.
x.var
name of the variable for which partial
dependence is to be examined.
which.class
For classification data, the class to focus on
(default the first class).
add
whether to add to existing plot (TRUE
) or create a
new plot (FALSE
).
n.pt
if x.var
is continuous, the number of points on the
grid for evaluating partial dependence.
rug
whether to draw hash marks at the bottom of the plot
indicating the deciles of x.var
.
xlab
label for the x-axis.
ylab
label for the y-axis.
main
main title for the plot.
...
other graphical parameters to be passed on to plot
or lines
.