gbm.perf: GBMT Performance

View source: R/gbm-perf.r

gbm.perfR Documentation

GBMT Performance

Description

Estimates optimal number of boosting iterations given a GBMFit object and optionally plots various performance measures.

Usage

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

Arguments

object

a GBMFit object created from an initial call to gbmt or 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 the train error (in black) and the validation 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.

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.

main

the main title for the plot. Defaults to main = "".

Value

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

See Also

gbmt gbmt_performance plot.GBMTPerformance


gbm-developers/gbm3 documentation built on April 28, 2024, 10:04 p.m.