confuse.binary-class-metrics
accuracy
(accuracy actual predicted)
Accepts a vector where each element is a vector with 2 elements, the predicted
and actual class.
confusion-matrix
(confusion-matrix actual predicted)
(confusion-matrix actual predicted classes)
returns a map representing the confusion matrix. The keys are a vector with [predicted, actual] and the values are the counts.
confusion-matrix-str
(confusion-matrix-str conf-mat)
returns a string representation given a confusion matrix as a map argument
counts
(counts actual predicted filt1)
(counts actual predicted filt1 filt2)
f1-score
(f1-score actual predicted positive-class)
returns the F1 score, defined as the harmonic mean of precision and recall.
false-negative-rate
(false-negative-rate actual predicted positive-class)
returns the false negative rate, defined as count of actual positive and predicted negative, divided by count of actual positives
false-negatives
(false-negatives actual predicted positive-class)
returns the count of false negatives, defined as the count of predicted negative class and actual positive class
false-positive-rate
(false-positive-rate actual predicted positive-class)
returns the false positive rate, defined as count of actual positives predicted as a negative, divided by count of actual negatives.
Also known as fall-out.
false-positives
(false-positives actual predicted positive-class)
returns the count of false positives, defined as the count of predicted positive class and actual negative class
misclassification-rate
(misclassification-rate actual predicted)
returns the misclassification rate, defined as (1 - accuracy)
precision
(precision actual predicted positive-class)
returns Precision, defined as the count of true positives over the count of true positives plus the count of false positives.
recall
(recall actual predicted positive-class)
sensitivity
(sensitivity actual predicted positive-class)
returns sensitivity, defined as the count of correctly predicted positives divided by count of actual positives. Also known as true positive rate or recall
specificity
(specificity actual predicted positive-class)
returns the specificity, also known as true negative rate, defined as the count of correctly predicted negatives divided by count of actual negatives
true-negative-rate
(true-negative-rate actual predicted positive-class)
returns the true negative rate, defined as the count of correctly predicted negatives divided by count of actual negatives
true-negatives
(true-negatives actual predicted positive-class)
returns the count of true positives, defined as count of predicted negative class and actual negative class
true-positive-rate
(true-positive-rate actual predicted positive-class)
returns the true positive rate, defined as the count of correctly predicted positives divided by count of actual positives,
Also known as sensitivity and recall
true-positives
(true-positives actual predicted)
(true-positives actual predicted positive-class)
returns the count of true positives, defined as predicted positive class and actual positive class