plotPartial: Plotting Partial Dependence Functions

Description Usage Arguments Examples

Description

Plots partial dependence functions (i.e., marginal effects) using lattice graphics.

Usage

1
2
3
4
5
6
plotPartial(x, ...)

## S3 method for class 'partial'
plotPartial(x, smooth = FALSE, rug = FALSE,
  chull = FALSE, levelplot = TRUE, contour = FALSE, number = 4,
  overlap = 0.1, train = NULL, col.regions = viridis::viridis, ...)

Arguments

x

An object that inherits from the "partial" class.

...

Additional optional arguments to be passed onto dotplot, levelplot, xyplot, or wireframe.

smooth

Logical indicating whether or not to overlay a LOESS smooth. Default is FALSE.

rug

Logical indicating whether or not to include rug marks on the predictor axes. Default is FALSE.

chull

Logical indicating wether or not to restrict the first two variables in pred.var to lie within the convex hull of their training values; this affects pred.grid. Default is FALSE.

levelplot

Logical indicating whether or not to use a false color level plot (TRUE) or a 3-D surface (FALSE). Default is TRUE.

contour

Logical indicating whether or not to add contour lines to the level plot. Only used when levelplot = TRUE. Default is FALSE.

number

Integer specifying the number of conditional intervals to use for the continuous panel variables. See co.intervals and equal.count for further details.

overlap

The fraction of overlap of the conditioning variables. See co.intervals and equal.count for further details.

train

Data frame containing the original training data. Only required if rug = TRUE or chull = TRUE.

col.regions

Color vector to be used if levelplot is TRUE. Defaults to the wonderful Matplotlib 'viridis' color map provided by the viridis package. See viridis for details.

Examples

1
2
# See ?partial for examples
?partial


Search within the pdp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.