Plot a partial dependence from generatePartialDependenceData using ggplot2.
plotPartialDependence(obj, geom = "line", facet = NULL,
facet.wrap.nrow = NULL, facet.wrap.ncol = NULL, p = 1,
data = NULL)
Generated by generatePartialDependenceData.
The type of geom to use to display the data. Can be “line” or “tile”.
For tiling at least two features must be used with
interaction = TRUE in the call to
generatePartialDependenceData. This may be used in conjuction with the
facet argument if three features are specified in the call to
Default is “line”.
The name of a feature to be used for facetting.
This feature must have been an element of the
features argument to
generatePartialDependenceData and is only applicable when said argument had length
greater than 1.
The feature must be a factor or an integer.
If generatePartialDependenceData is called with the
(the default) with argument
features of length greater than one, then
facet is ignored and
each feature is plotted in its own facet.
Number of rows and columns for facetting. Default for both is
In this case ggplot's
facet_wrap will choose the layout itself.
individual = TRUE then
sample allows the user to sample without replacement
from the output to make the display more readable. Each row is sampled with probability
Data points to plot. Usually the training data. For survival and binary classification tasks a rug plot
wherein ticks represent failures or instances of the positive class are shown. For regression tasks
points are shown. For multiclass classification tasks ticks are shown and colored according to their class.
Both the features and the target must be included.
ggplot2 plot object.