predict.tsp.gbm {BigTSP}R Documentation

prediction function for tsp.gbm

Description

prediction function for tsp.gbm

Usage

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

Arguments

object

a tsp.gbm object

newdata

new data matrix

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

type

The scale on which gbm makes the predictions

single.tree

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

...

not used.

Author(s)

Xiaolin Yang, Han Liu

References

gbm package

Examples

library(gbm)
x=matrix(rnorm(100*20),100,20)
y=rbinom(100,1,0.5)
fit=tsp.gbm(x,y)
predict(fit,x[1:10,],n.trees=5)

[Package BigTSP version 1.0 Index]