- object
The gbm
model.
- smooth
Four-element vector specifying if smoothing should be applied
to the train, test, CV, and OOB curves respectively.
When smoothing is specified, a smoothed curve is plotted and the
minimum is calculated from the smoothed curve.
The default is c(0, 0, 0, 1) meaning apply smoothing only to the
OOB curve (same as gbm.perf
).
Note that smooth=1
(which gets recyled to c(1,1,1,1)
)
will smooth all the curves.
- col
Four-element vector specifying the colors for the train, test, CV, and OOB
curves respectively.
The default is c(1, 2, 3, 4)
.
Use a color of 0
to remove the corresponding curve, e.g.
col=c(1,2,3,0)
to not display the OOB curve.
If col=0
(which gets recycled to c(0,0,0,0)
) nothing
will be plotted, but plot_gbm
will return the number-of-trees
at the minima as usual (as described in the Value section below).
- ylim
The default ylim="auto"
shows more detail around the minima.
Use ylim=NULL
for the full vertical range of the curves.
Else specify ylim
as usual.
- legend.x
The x position of the legend.
The default positions the legend automatically.
Use legend.x=NA
for no legend.
See the x
and y
arguments of
xy.coords
for other options,
for example legend.x="topright"
.
- legend.y
The y position of the legend.
- legend.cex
The legend cex
(the default is 0.8
).
- grid.col
Default NA
.
Color of the optional grid, for example grid.col=1
.
- n.trees
For use by plotres
.
The x position of the gray vertical line indicating the n.trees
passed by plotres
to predict.gbm
to calculate the residuals.
Plotres defaults to all trees.
- col.n.trees
For use by plotres
.
Color of the vertical line showing the n.trees
argument.
Default is "darkgray"
.
- ...
Dot arguments are passed internally to
plot.default
.