assess: sboost Assessment Function

View source: R/assess.R

assessR Documentation

sboost Assessment Function

Description

Assesses how well an sboost classifier classifies the data.

Usage

assess(object, features, outcomes, include_scores = FALSE)

Arguments

object

sboost_classifier S3 object output from sboost.

features

feature set data.frame.

outcomes

outcomes corresponding to the features.

include_scores

if true feature_scores are included in output.

Value

An sboost_assessment S3 object containing:

performance

Last row of cumulative statistics (i.e. when all stumps are included in assessment).

cumulative_statistics

stump - the index of the last decision stump added to the assessment.
true_positive - number of true positive predictions.
false_negative - number of false negative predictions.
true_negative - number of true negative predictions.
false_positive - number of false positive predictions.
prevalence - true positive / total.
accuracy - correct predictions / total.
sensitivity - correct predicted positive / true positive.
specificity - correct predicted negative / true negative.
ppv - correct predicted positive / predicted positive.
npv - correct predicted negative / predicted negative.
f1 - harmonic mean of sensitivity and ppv.

feature_scores

If include_scores is TRUE, for each feature in the classifier lists scores for each row in the feature set.

classifier

sboost sboost_classifier object used for assessment.

outcomes

Shows which outcome was considered as positive and which negative.

call

Shows the parameters that were used for assessment.

See Also

sboost documentation.

Examples

# malware
malware_classifier <- sboost(malware[-1], malware[1], iterations = 5, positive = 1)
assess(malware_classifier, malware[-1], malware[1])

# mushrooms
mushroom_classifier <- sboost(mushrooms[-1], mushrooms[1], iterations = 5, positive = "p")
assess(mushroom_classifier, mushrooms[-1], mushrooms[1])

jadonwagstaff/sboost documentation built on May 16, 2022, 7:58 a.m.