Description Usage Arguments Examples
Fit GBDT model and predict classification
1 |
data |
a data.frame with signal characteristics of signals to be predicted |
train |
a data.frame with signal characteristics and classification of signals from which to learn the model |
verbose |
when TRUE (the default), print information about the fitted model |
... |
passed to |
1 2 3 4 5 6 7 8 9 10 11 12 | data(sirena)
sub <- subsample(sirena[,-ncol(sirena)], p=0.2)
train <- sirena[sub$picked,]
data <- sirena[!sub$picked,]
pred <- classify(data=data[,-ncol(data)], train=train,
n.trees=100, shrinkage=0.01, n.minobsinnode=1,
n.cores=1)
# 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.
head(pred)
(cm <- confusion_matrix(true=data$type, pred=pred$type))
confusion_stats(cm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.