Takes a gbm boosted regression tree object produced by gbm.step and plots a perspective plot showing predicted values for two predictors as specified by number using x and y. Values for all other variables are set at their mean by default but values can be specified by giving a list consisting of the variable name and its desired value, e.g., c(name1 = 12.2, name2 = 57.6)
gbm.perspec(gbm.object, x = 1, y = 2, pred.means = NULL, x.label = NULL, x.range = NULL,
y.label = NULL, z.label = "fitted value", y.range = NULL, z.range = NULL,
leg.coords = NULL, ticktype = "detailed", theta = 55, phi = 40, smooth = "none",
mask = FALSE, perspective = TRUE, ...)
object of class gbm
the first variable to be plotted
the second variable to be plotted
allows specification of values for other variables
allows manual specification of the x label
manual range specification for the x variable
and y label
default z label
and the y
allows control of the vertical axis
can specify coords (x, y) for legend
specifiy detailed types - otherwise "simple"
rotation
and elevation
controls smoothing of the predicted surface
controls masking using a sample intensity model
controls whether a contour or perspective plot is drawn
allows the passing of additional arguments to plotting routine useful options include shade, ltheta, lphi for controlling illumination and cex for controlling text size - cex.axis and cex.lab have no effect
John R. Leathwick and Jane Elith
Elith, J., J.R. Leathwick and T. Hastie, 2009. A working guide to boosted regression trees. Journal of Animal Ecology 77: 802-81