Function to draw partial dependency plots with fitted function from a boosted regression trees obtained with the gbm.step routine in the dismo package.
1 2 3 4 5 |
gbm.object |
a gbm.step object (object of S3 class gbm) |
n.plots |
number of predictors to display, ranked by decreasing relative influence (default=all) |
predictor |
select a single variable. Can be either a character name (use "") or a number indicating its ranking in terms of relative influence |
ncol |
number of plots per column |
col.line |
color of the line |
cex.line |
size of the line (default = 0.5) |
smooth |
Logical. If TRUE, (default FALSE) add a smoother to the fitted function |
col.smooth |
color of the smoother |
cex.smooth |
size of the smoother line (default = 0.3) |
span |
span of the smoother (default = 0.3) |
rug |
Logical. If TRUE (default FALSE), add rugs to the plot indicating the actual data points |
rug.pos |
position of the rugs (default = "t"). Can be either "t" (top), "l" (left), "b" (bottom), or "r" (right) |
common.scale |
Logical. If TRUE (default), all the plots have the same y limits |
y.label |
title for the y-axis (default = "Fitted function") |
x.label |
title for the x-axis (by default the predictor name and its relative influence) |
nrow: |
number of plots per row |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.