aerial.utils.math.scores

Various data test and analysis performance scoring.

acc

(acc tp tn ap an)
ACCuracy of classification and (by extension across multiple cases)
classifier.  TP and TN are the classification TruePostives and
TrueNegatives respectivel.  AP and AN are the ActualPositives and
ActualNegatives respectively.  Ratio of sum of correct
classifications to total values: (TP + TN) / (AP + AN), so result
lies in [0, 1]

AUC

(AUC pts)
A simple trapezoidal area under the curve implementation mostly
intended for ROC curve results.

false-negative-rate

(false-negative-rate fn tp)
Ratio of false negatives to the total actual positives, the latter
being the false negatives plus the true positives (the remaining
actual positives not counted as false): (/ FN (+ FN TP)).  AKA
'miss rate'.

*** Somehow this originally named the false POSITIVE rate function
    - how did that happen??

false-positive-rate

(false-positive-rate fp tn)
Ratio of false positives to the total actual negatives, the latter
being the true negatives plus the false positives (the remaining
actuals not counted as false): (/ FP (+ TN FP)) = 1 - 'specificity'

Where 'specificity' = ratio of true negatives to total actual
negatives: (/ TN (+ TN FP))

mcc

(mcc tp tn fp fn)
Mathews Correlation Coefficient aka 'phi-coefficient'.  Correlation
indicator (coefficient) between real and predicted classifications.
Values lie in [-1, 1], where -1 indicates complete negative
correlation (total disagreement between real and predicted), 0
indicates prediction no better than random guess, and 1 indicates
perfect correlation (complete agreement).

Returns (TP*TN - FP*FN) / sqrt(P*N*P'*N'), where

P = total real positives = TP + FN
N = total real negatives = TN + FP
P' = predicted positives = TP + FP
N' = predicted negatives = TN + FN

ppv

(ppv tp fp)
Positive Predictive Value, aka 'precision'.  Ratio of true
positives to all predicted positives: TP / (TP + FP).

ROC-opt-classifier-pt

(ROC-opt-classifier-pt pts tprfn fprfn)

true-negative-rate

(true-negative-rate tn fp)
Ratio of true negatives to the total actual negatives, the latter
being the true negatives plus the fase positives (/ TN (+ TN FP)).
AKA 'specificity'.

true-positive-rate

(true-positive-rate tp fn)
Ratio of true positives to the total actual positives, the latter
being the true positives plus the false negatives (the remaining
actuals not counted as true): (/ TP (+ TP FN)).  AKA 'hit rate',
'recall', and 'sensitivity'.