Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gbm.perf

GBM performance


Description

Estimates the optimal number of boosting iterations for a gbm object and optionally plots various performance measures

Usage

gbm.perf(object, plot.it = TRUE, oobag.curve = FALSE, overlay = TRUE, method)

Arguments

object

A gbm.object created from an initial call to gbm.

plot.it

An indicator of whether or not to plot the performance measures. Setting plot.it = TRUE creates two plots. The first plot plots object$train.error (in black) and object$valid.error (in red) versus the iteration number. The scale of the error measurement, shown on the left vertical axis, depends on the distribution argument used in the initial call to gbm.

oobag.curve

Indicates whether to plot the out-of-bag performance measures in a second plot.

overlay

If TRUE and oobag.curve=TRUE then a right y-axis is added to the training and test error plot and the estimated cumulative improvement in the loss function is plotted versus the iteration number.

method

Indicate the method used to estimate the optimal number of boosting iterations. method = "OOB" computes the out-of-bag estimate and method = "test" uses the test (or validation) dataset to compute an out-of-sample estimate. method = "cv" extracts the optimal number of iterations using cross-validation if gbm was called with cv.folds > 1.

Value

gbm.perf Returns the estimated optimal number of iterations. The method of computation depends on the method argument.

Author(s)

Greg Ridgeway gregridgeway@gmail.com

See Also


gbm

Generalized Boosted Regression Models

v2.1.8
GPL (>= 2) | file LICENSE
Authors
Brandon Greenwell [aut, cre] (<https://orcid.org/0000-0002-8120-0084>), Bradley Boehmke [aut] (<https://orcid.org/0000-0002-3611-8516>), Jay Cunningham [aut], GBM Developers [aut] (https://github.com/gbm-developers)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.