Partial dependence plot gives a graphical depiction of the marginal
effect of a variable on the class probability (classification) or
response (regression).
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).
w
weights to be used in averaging; if not supplied, mean is not
weighted
plot
whether the plot should be shown on the graphic device.
add
whether to add to existing plot (TRUE).
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.
Details
The function being plotted is defined as:
\tilde{f}(x) = frac{1}{n} ∑_{i=1}^n f(x, x_{iC}),
where x is the variable for which partial dependence is sought,
and x_{iC} is the other variables in the data. The summand is
the predicted regression function for regression, and logits
(i.e., log of fraction of votes) for which.class for
classification: