predict.gbdt: Predict classifications from a Gradient Boosting Decision...

Description Usage Arguments See Also Examples

Description

Predict classifications from a Gradient Boosting Decision Tree model

Usage

1
2
## S3 method for class 'gbdt'
predict(object, n.trees = object$best.iter, ...)

Arguments

object

a gbdt object, from fit.gbdt

n.trees

number of trees used in the prediction.

...

passed to predict.gbm

See Also

predict.gbm in package gbm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(sirena)
head(sirena)
m <- fit.gbdt(x=sirena, n.trees=3, shrinkage=0.01, interaction.depth=1,
              n.cores=1)
# NB: The arguments values are caricatural here for the example to run
#     quickly enough and because the data is easy.
# NB: n.cores = 1 is necessary for examples to run on all machines. Feel
#     free to remove it and use more cores on your machine.
pred <- predict(m, newdata=sirena)
head(pred)

jiho/soundclass documentation built on June 5, 2019, 10:10 p.m.