This commit is contained in:
Morten Hjorth-Jensen
2023-11-08 06:50:16 +01:00
parent aa20c7f18d
commit c35005a900
35 changed files with 2431 additions and 2071 deletions
+46 -13
View File
@@ -329,21 +329,38 @@ o The true negative $TN$ number which represents whether a negative test has bee
o The false positive $FP$ number, a so-called type I error which tells us about the fraction of positive test result which are wrongly classified
o A false negative $FN$ number, a so-called type II error which, should be pretty obvious, indicates if a negative test has been wrongly classified.
It is is easy to think in terms of illness. You could think of the above as
o True positive: Sick people correctly identified as sick
o False positive: Healthy people incorrectly identified as sick
o True negative: Healthy people correctly identified as healthy
o False negative: Sick people incorrectly identified as healthy
!split
===== Combinations of classification results =====
It is common in the literature to define various combinations the above numbers. The most commonly used are
!bblock Sensitivity, recall, hit rate, or true positive rate $TPR$
!bblock Sensitivity, recall, hit rate, or true positive rate $TPR$. It is the probability of a positive test result, conditioned on the individual truly being positive.
!bt
\[
{\displaystyle \mathrm {TPR} ={\frac {\mathrm {TP} }{\mathrm {P} }}={\frac {\mathrm {TP} }{\mathrm {TP} +\mathrm {FN} }}=1-\mathrm {FNR} }
\]
!et
!eblock
The $TPR$ defines how many correct positive results occur among all positive samples available during the test
!bblock Specificity, selectivity or true negative rate $TNR$
!bblock Miss rate or false negative rate $FNR$
!bt
\[
{\displaystyle \mathrm {FNR} ={\frac {\mathrm {FN} }{\mathrm {P} }}={\frac {\mathrm {FN} }{\mathrm {FN} +\mathrm {TP} }} }
\]
!et
!eblock
!bblock Specificity, selectivity or true negative rate $TNR$. It is the probability of a negative test result, conditioned on the individual truly being negative.
!bt
\[
{\displaystyle \mathrm {TNR} ={\frac {\mathrm {TN} }{\mathrm {N} }}={\frac {\mathrm {TN} }{\mathrm {TN} +\mathrm {FP} }}=1-\mathrm {FPR} }
@@ -356,8 +373,21 @@ with the fall-out false positive rate
\]
!et
!eblock
The $FPR$ defines how many incorrect positive results occur among
all negative samples available during the test.
!bblock Precision or positive predictive value $PPV$
!split
===== Positive and negative prediction values =====
The positive and negative predictive values
are the proportions of positive and negative results in statistics and
diagnostic tests that are true positive and true negative results,
respectively.[1] The PPV and NPV describe the performance of a
diagnostic test or other statistical measure. A high result can be
interpreted as indicating the accuracy of such a statistic.
!bblock Precision or positive predictive value $PPV$.
!bt
\[
{\displaystyle \mathrm {PPV} ={\frac {\mathrm {TP} }{\mathrm {TP} +\mathrm {FP} }}=1-\mathrm {FDR} }
@@ -374,13 +404,9 @@ with the fall-out false positive rate
!eblock
!bblock Miss rate or false negative rate $FNR$
!bt
\[
{\displaystyle \mathrm {FNR} ={\frac {\mathrm {FN} }{\mathrm {P} }}={\frac {\mathrm {FN} }{\mathrm {FN} +\mathrm {TP} }} }
\]
!et
!eblock
!split
===== Other quantities =====
!bblock False discovery rate $FDR$
@@ -434,10 +460,17 @@ graphical plot that illustrates the performance of a binary classifier
model at varying threshold values.
The ROC curve is the plot of the true positive rate (TPR) against the false positive rate (FPR) at each threshold setting.
To draw a ROC curve, only the true positive rate (TPR) and false
positive rate (FPR) are needed (as functions of some classifier
parameter). The TPR defines how many correct positive results occur
among all positive samples available during the test. FPR, on the
other hand, defines how many incorrect positive results occur among
all negative samples available during the test.
See URL:"https://en.wikipedia.org/wiki/Receiver_operating_characteristic" for more discussions.
!split
===== Cumulative gain curve =====
@@ -447,7 +480,7 @@ fraction of examples correctly classified
against Predictive Positive Rate, which represents
the fraction of positively predicted examples.
The examples below show the confusion matrix, the ROC curve and the cumulative gain for the Wisconsin cancer data.
!split