predict.gbm.prmdt: predict.gbm.prmdt

View source: R/predict.R

predict.gbm.prmdtR Documentation

predict.gbm.prmdt

Description

Return prediction for a gbm model.

Usage

## S3 method for class 'gbm.prmdt'
predict(
  object,
  newdata,
  type = "class",
  n.trees = NULL,
  single.tree = FALSE,
  ...
)

Arguments

object

a gbm model object for which prediction is desired.

newdata

an optional data frame in which to look for variables with which to predict.

type

type of prediction 'prob' or 'class' (default).

n.trees

Number of trees used in the prediction. n.trees may be a vector in which case predictions are returned for each iteration specified

single.tree

If single.tree=TRUE then predict.gbm returns only the predictions from tree(s) n.trees.

...

additional arguments affecting the predictions produced.

Value

a vector or matrix of predictions gbm model.


traineR documentation built on Nov. 10, 2023, 1:15 a.m.