predict.sboost_classifier {sboost} | R Documentation |
Make predictions for a feature set based on an sboost classifier.
Description
Make predictions for a feature set based on an sboost classifier.
Usage
## S3 method for class 'sboost_classifier'
predict(object, features, scores = FALSE, ...)
Arguments
object |
sboost_classifier S3 object output from sboost. |
features |
feature set data.frame. |
scores |
if true, raw scores generated; if false, predictions are generated. |
... |
further arguments passed to or from other methods. |
Value
Predictions in the form of a vector, or scores in the form of a vector. The index of the vector aligns the predictions or scores with the rows of the features. Scores represent the sum of all votes for the positive outcome minus the sum of all votes for the negative outcome.
See Also
sboost
documentation.
Examples
# malware
malware_classifier <- sboost(malware[-1], malware[1], iterations = 5, positive = 1)
predict(malware_classifier, malware[-1], scores = TRUE)
predict(malware_classifier, malware[-1])
# mushrooms
mushroom_classifier <- sboost(mushrooms[-1], mushrooms[1], iterations = 5, positive = "p")
predict(mushroom_classifier, mushrooms[-1], scores = TRUE)
predict(mushroom_classifier, mushrooms[-1])
[Package sboost version 0.1.2 Index]