Pdp
A general framework for constructing partial dependence (i.e., marginal effect) plots from various types machine learning models in R.
Install / Use
/learn @bgreenwell/PdpREADME
pdp <img src="man/figures/pdp-logo.png" align="right" width="130" height="150" />
<!-- badges: start --> <!-- badges: end -->Overview
pdp is an R package for constructing partial dependence plots (PDPs) and individual conditional expectation (ICE) curves. PDPs and ICE curves are part of a larger framework referred to as interpretable machine learning (IML), which also includes (but not limited to) variable importance plots (VIPs). While VIPs (available in the R package vip) help visualize feature impact (either locally or globally), PDPs and ICE curves help visualize feature effects. An in-progress, but comprehensive, overview of IML can be found at the following URL: https://github.com/christophM/interpretable-ml-book.
A detailed introduction to pdp has been published in The R Journal: “pdp: An R Package for Constructing Partial Dependence Plots”, https://journal.r-project.org/archive/2017/RJ-2017-016/index.html. You can track development at https://github.com/bgreenwell/pdp. To report bugs or issues, contact the main author directly or submit them to https://github.com/bgreenwell/pdp/issues. For additional documentation and examples, visit the package website.
As of right now, pdp exports the following functions:
-
partial()- compute partial dependence functions and individual conditional expectations (i.e., objects of class"partial"and"ice", respectively) from various fitted model objects; -
plotPartial()"- constructlattice-based PDPs and ICE curves; -
autoplot()- constructggplot2-based PDPs and ICE curves; -
~~
topPredictors()extract most “important” predictors from various types of fitted models.~~ see vip instead for a more robust and flexible replacement; -
exemplar()- construct an exemplar record from a data frame (experimental feature that may be useful for constructing fast, approximate feature effect plots.)
Installation
# 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")
Related Skills
proje
Interactive vocabulary learning platform with smart flashcards and spaced repetition for effective language acquisition.
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
API
A learning and reflection platform designed to cultivate clarity, resilience, and antifragile thinking in an uncertain world.
openclaw-plugin-loom
Loom Learning Graph Skill This skill guides agents on how to use the Loom plugin to build and expand a learning graph over time. Purpose - Help users navigate learning paths (e.g., Nix, German)
