View source: R/gpb.plot.partial.dependence.R
| gpb.plot.partial.dependence | R Documentation |
Plot partial dependence plots
gpb.plot.partial.dependence(model, data, variable, latent_scale = TRUE,
n.pt = 100, subsample = pmin(1, n.pt * 100/nrow(data)),
discrete.x = FALSE, which.class = NULL,
xlab = deparse(substitute(variable)), ylab = "", type = if (discrete.x)
"p" else "b", main = "", return_plot_data = FALSE, ...)
model |
A |
data |
A |
variable |
A |
latent_scale |
If TRUE, the plot is done on the scale of the tree-ensemble. If FALSE, the plot is done on the (potentially transformed) response variable scale (e.g. probabilities for classification) |
n.pt |
Evaluation grid size (used only if x is not discrete) |
subsample |
Fraction of random samples in |
discrete.x |
A |
which.class |
An |
xlab |
Parameter passed to |
ylab |
Parameter passed to |
type |
Parameter passed to |
main |
Parameter passed to |
return_plot_data |
A |
... |
Additional parameters passed to |
A two-dimensional matrix with data for creating the partial dependence plot.
This is only returned if return_plot_data==TRUE
Fabio Sigrist (adapted from a version by Michael Mayer)
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.partial.dependence(gpboost_model, X, variable = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.