
pdp is an Rpackage for constructingpartialdependenceplots (PDPs) andindividualconditionalexpectation (ICE) curves. PDPs and ICE curves arepart of a larger framework referred to asinterpretable machinelearning (IML), which also includes (but not limited to)variableimportanceplots (VIPs). While VIPs (available in the Rpackagevip)help visualize feature impact (either locally or globally), PDPs and ICEcurves help visualize feature effects. An in-progress, butcomprehensive, overview of IML can be found at the following URL:https://github.com/christophM/interpretable-ml-book.
A detailed introduction topdp has been publishedin The R Journal: “pdp: An R Package for Constructing Partial DependencePlots”,https://journal.r-project.org/archive/2017/RJ-2017-016/index.html.You can track development athttps://github.com/bgreenwell/pdp. To report bugs orissues, contact the main author directly or submit them tohttps://github.com/bgreenwell/pdp/issues. For additionaldocumentation and examples, visit thepackagewebsite.
As of right now,pdp exports the followingfunctions:
partial() - compute partial dependence functions andindividual conditional expectations (i.e., objects of class"partial" and"ice", respectively) fromvarious fitted model objects;
plotPartial()" - constructlattice-based PDPs and ICE curves;
autoplot() - constructggplot2-basedPDPs and ICE curves;
seevip instead for amore robust and flexible replacement;topPredictors() extract most “important”predictors from various types of fitted models.
exemplar() - construct an exemplar record from adata frame (experimental feature that may be useful forconstructing fast, approximate feature effect plots.)
# The easiest way to get pdp is to install it from CRAN:install.packages("pdp")# Alternatively, you can install the development version from GitHub:if (!("remotes"%in%installed.packages()[,"Package"])) {install.packages("remotes")}remotes::install_github("bgreenwell/pdp")