gbm object and
optionally plots various performance measuresgbm.perf(object,
plot.it = TRUE,
oobag.curve = TRUE,
overlay = TRUE,
best.iter.calc = c("OOB","test")[1])gbm.object created from an initial call to
gbm.plot.it=TRUE creates two plots. The first plot plots
object$train.error (in black) and object$valid.error (in red)
versus the iteration nubest.iter.calc="OOB" computes the out-of-bag
estimate and best.iter.calc="test" uses the test (or validation) dataset
to compute an out-of-samplegbm.perf returns the estimated optimal number of iterations. The method
of computation depends on the best.iter.calc argument.gbm, gbm.object