Brute-force implementation of partial dependence that covers the model types
used within radiant.model (xgb.Booster, lm, glm, ranger, rpart, nnet).
This is an internal replacement for pdp::partial().
pdp_partial(
object,
pred.var,
pred.grid,
train,
prob = FALSE,
quantiles = FALSE,
probs = 1:9/10,
plot = FALSE,
plot.engine = "ggplot2",
rug = FALSE,
...
)A data frame with class c("partial","data.frame") when
plot = FALSE, or a ggplot object when plot = TRUE.
A fitted model object.
Character vector of predictor variable names.
Optional data frame with the grid of values to use.
Training data (data frame or matrix).
Logical; if TRUE return probabilities for classification.
Logical; use sample quantiles for the grid instead of equally-spaced values.
Numeric vector of probabilities when quantiles = TRUE.
Logical; if TRUE return a ggplot2 object.
Ignored (kept for API compatibility).
Logical; add rug marks when plot = TRUE.
Ignored (kept for API compatibility).