predict.sboost_classifier | R Documentation |
Make predictions for a feature set based on an sboost classifier.
## S3 method for class 'sboost_classifier' predict(object, features, scores = FALSE, ...)
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. |
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.
sboost
documentation.
# 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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.