Learn R Programming

radiant.model (version 1.6.12)

pdp_plot: Create Partial Dependence Plots

Description

Create Partial Dependence Plots

Usage

pdp_plot(
  x,
  plot_list = list(),
  incl,
  incl_int,
  fix = TRUE,
  hline = TRUE,
  nr = 20,
  pdp_range = c(0.025, 0.975),
  minq = NULL,
  maxq = NULL
)

Arguments

x

Return value from a model

plot_list

List used to store plots

incl

Which variables to include in PDP plots

incl_int

Which interactions to investigate in PDP plots

fix

Set the desired limited on yhat or have it calculated automatically. Set to FALSE to have y-axis limits set by ggplot2 for each plot

hline

Add a dashed horizontal line at the mean response. Set to FALSE to suppress, or a numeric value to draw the line at that specific value

nr

Number of values to use to generate predictions for a numeric explanatory variable

pdp_range

Numeric vector c(lo, hi) giving the percentile range used to trim the x-axis for numeric predictors (default c(0.025, 0.975))

minq

Deprecated. Use pdp_range[1] instead

maxq

Deprecated. Use pdp_range[2] instead