gpb.plot.part.dep.interact {gpboost} | R Documentation |
Plot interaction partial dependence plots
Description
Plot interaction partial dependence plots
Usage
gpb.plot.part.dep.interact(model, data, variables, n.pt.per.var = 20,
subsample = pmin(1, n.pt.per.var^2 * 100/nrow(data)),
discrete.variables = c(FALSE, FALSE), which.class = NULL,
type = "filled.contour", nlevels = 20, xlab = variables[1],
ylab = variables[2], zlab = "", main = "", return_plot_data = FALSE,
...)
Arguments
model |
A |
data |
A |
variables |
A |
n.pt.per.var |
Number of grid points per variable (used only if a variable is not discrete) For continuous variables, the two-dimensional grid for the interaction plot has dimension c(n.pt.per.var, n.pt.per.var) |
subsample |
Fraction of random samples in |
discrete.variables |
A |
which.class |
An |
type |
A |
nlevels |
Parameter passed to the |
xlab |
Parameter passed to the |
ylab |
Parameter passed to the |
zlab |
Parameter passed to the |
main |
Parameter passed to the |
return_plot_data |
A |
... |
Additional parameters passed to the |
Value
A list
with three entries for creating the partial dependence plot:
the first two entries are vector
s with x and y coordinates.
The third is a two-dimensional matrix
of dimension c(length(x), length(y))
with z-coordinates. This is only returned if return_plot_data==TRUE
Author(s)
Fabio Sigrist
Examples
library(gpboost)
data(GPBoost_data, package = "gpboost")
gp_model <- GPModel(group_data = group_data[,1], likelihood = "gaussian")
gpboost_model <- gpboost(data = X,
label = y,
gp_model = gp_model,
nrounds = 16,
learning_rate = 0.05,
max_depth = 6,
min_data_in_leaf = 5,
verbose = 0)
gpb.plot.part.dep.interact(gpboost_model, X, variables = c(1,2))