Template:diagnostic testing diagram

class="wikitable" align="center" style="border:none; background:transparent; text-align:center;"

| style="border:none;" rowspan="2" |

| style="border:none;" |

| style="background:#bbeeee;" colspan="2" | Predicted condition

| style="border:none; text-align:right;" colspan="2" | Sources: {{cite journal |last=Fawcett |first=Tom |title=An Introduction to ROC Analysis |journal=Pattern Recognition Letters |date=2006 |volume=27 |issue=8 |pages=861–874 |doi=10.1016/j.patrec.2005.10.010 |s2cid=2027090 |url=http://people.inf.elte.hu/kiss/11dwhdm/roc.pdf}}{{Cite web |url=https://www.researchgate.net/publication/256438799|title=Data Science for Business: What You Need to Know about Data Mining and Data-Analytic Thinking. |last1=Provost |first1=Foster |date=2013-08-01 |website=O'Reilly Media, Inc. |language=en|last2=Tom Fawcett }}

{{cite journal |first=David M. W. |last=Powers |date=2011 |title=Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness & Correlation |journal=Journal of Machine Learning Technologies |volume=2 |issue=1 |pages=37–63 |url=https://www.researchgate.net/publication/228529307}}

{{cite book |last=Ting |first=Kai Ming |editor2-first=Geoffrey I. |editor2-last=Webb |editor1-first=Claude |editor1-last=Sammut |title=Encyclopedia of machine learning |date=2011 |publisher=Springer |doi=10.1007/978-0-387-30164-8 |isbn=978-0-387-30164-8 }}

{{cite web |url=https://www.cawcr.gov.au/projects/verification/ |title=WWRP/WGNE Joint Working Group on Forecast Verification Research |last1=Brooks |first1=Harold |last2=Brown |first2=Barb |last3=Ebert |first3=Beth |last4=Ferro |first4=Chris |last5=Jolliffe |first5=Ian |last6=Koh |first6=Tieh-Yong |last7=Roebber |first7=Paul |last8=Stephenson |first8=David |date=2015-01-26|website=Collaboration for Australian Weather and Climate Research|publisher=World Meteorological Organisation|access-date=2019-07-17}}

{{cite journal |vauthors = Chicco D, Jurman G |title = The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation |journal = BMC Genomics |volume = 21 |issue = 1 |date = January 2020 |page = 6-1–6-13 |pmid = 31898477 |doi = 10.1186/s12864-019-6413-7 |pmc = 6941312 |doi-access = free }}

{{cite journal |vauthors = Chicco D, Toetsch N, Jurman G |title = The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation |journal = BioData Mining |volume = 14 |issue = 13 |date = February 2021 |page = 13 |pmid = 33541410 | pmc = 7863449 |doi = 10.1186/s13040-021-00244-z |doi-access = free }}

{{cite journal |author = Tharwat A. |title = Classification assessment methods |journal = Applied Computing and Informatics |date = August 2018 |volume = 17 |pages = 168–192 |doi = 10.1016/j.aci.2018.08.003 |doi-access = free }} {{navbar|Diagnostic testing diagram|plain=y}}

style="background:#eeeeee;" | Total population
{{math|{{=}} P + N}}

| style="background:#ccffff;" | Predicted positive

| style="background:#aadddd;" | Predicted negative

| style="border-left:double silver;background:#ffffff" | Informedness, {{small|bookmaker informedness (BM)}}
{{math|{{=}} TPR + TNR − 1}}

| style="background:#ffffff;" | Prevalence threshold (PT)
{{math|{{=}} {{sfrac|{{sqrt|TPR × FPR}} - FPR|TPR - FPR}}}}

rowspan="2" {{verth|va=middle|cellstyle=background:#eeeebb;|Actual condition}}

| style="background:#ffffcc;" | Positive (P) {{efn|the number of real positive cases in the data}}

| style="background:#ccffcc;" | True positive (TP),
{{small|hit}}{{efn|A test result that correctly indicates the presence of a condition or characteristic}}

| style="background:#ffdddd;" | False negative (FN),
{{small|miss, underestimation}}

| style="background:#eeffee;" | True positive rate (TPR), recall, sensitivity (SEN), {{small|probability of detection, hit rate, power}}
{{math|{{=}} {{sfrac|TP|P}}}} {{math|{{=}} 1 − FNR}}

| style="background:#ffeeee;" | False negative rate (FNR),
{{small|miss rate}}
{{small|type II error}} {{efn|Type II error: A test result which wrongly indicates that a particular condition or attribute is absent}}
{{math|{{=}} {{sfrac|FN|P}}}} {{math|{{=}} 1 − TPR}}

style="background:#ddddaa;" | Negative (N){{efn|the number of real negative cases in the data}}

| style="background:#ffcccc;" | False positive (FP),
{{small|false alarm, overestimation}}

| style="background:#bbeebb;" | True negative (TN),
{{small|correct rejection}}{{efn|A test result that correctly indicates the absence of a condition or characteristic}}

| style="background:#eedddd;" | False positive rate (FPR),
{{small|probability of false alarm, evaluation measures (information retrieval)#Fall-out}}
{{small|type I error}} {{efn|Type I error: A test result which wrongly indicates that a particular condition or attribute is present}}
{{math|{{=}} {{sfrac|FP|N}}}} {{math|{{=}} 1 − TNR}}

| style="background:#ddeedd;"| True negative rate (TNR),
{{small|specificity (SPC), selectivity}}
{{math|{{=}} {{sfrac|TN|N}}}} {{math|{{=}} 1 − FPR}}

style="border:none;" rowspan="3"|

| style="border-top:double silver; border-right:double silver;background:#ffffff;" | Prevalence
{{math|{{=}} {{sfrac|P|P + N}}}}

| style="background:#eeffee;" | {{nowrap|Positive predictive value (PPV),}} {{small|precision}}
{{math|{{=}} {{sfrac|TP|TP + FP}}}} {{math|{{=}} 1 − FDR}}

| style="background:#ddeedd;" | Negative predictive value (NPV)
{{math|{{=}} {{sfrac|TN|TN + FN}}}} {{math|{{=}} 1 − FOR}}

| style="background:#eeeeff;" | Positive likelihood ratio (LR+)
{{math|{{=}} {{sfrac|TPR|FPR}}}}

| style="background:#eeeeff;" | Negative likelihood ratio (LR−)
{{math|{{=}} {{sfrac|FNR|TNR}}}}

style="border-right:double silver;background:#ffffff;"|Accuracy (ACC)
{{math|{{=}} {{sfrac|TP + TN|P + N}}}}

| style="background:#eedddd;"|False discovery rate (FDR)
{{math|{{=}} {{sfrac|FP|TP + FP}}}} {{math|{{=}} 1 − PPV}}

| style="background:#ffeeee;border-right:double silver;"|False omission rate (FOR)
{{math|{{=}} {{sfrac|FN|TN + FN}}}} {{math|{{=}} 1 − NPV}}

| style="border-top:double silver;border-right:double silver;background:#ffffff;" | Markedness (MK), {{small|deltaP (Δp)}}
{{math|{{=}} PPV + NPV − 1}}

| style="background:#eeeeff;" | Diagnostic odds ratio (DOR)
{{math|{{=}} {{sfrac|LR+|LR−}}}}

style="background:#ffffff;" | Balanced accuracy (BA)
{{math|{{=}} {{sfrac|TPR + TNR|2}}}}

| style="border-top:double silver;background:#ffffff;"|F1 score
{{math|{{=}} {{sfrac|2 PPV × TPR|PPV + TPR}}}} {{math|{{=}} {{sfrac|2 TP|2 TP + FP + FN}}}}

| style="border-top:double silver;background:#ffffff;"|Fowlkes–Mallows index (FM)
{{math|{{=}} {{sqrt|PPV × TPR}}}}

| style="border-top:double silver;background:#ffffff;"|phi or Matthews correlation coefficient (MCC)
{{math|{{=}} {{sqrt|TPR × TNR × PPV × NPV}}|size=80%}} {{math

{{sqrt|FNR × FPR × FOR × FDR}}|size=80%}}

| style="border-top:double silver;background:#ffffff;" colspan="2"|Threat score (TS), critical success index (CSI), Jaccard index
{{math|{{=}} {{sfrac|TP|TP + FN + FP}}}}

{{notelist}}

{{Template reference list}}

{{documentation

|content=

{{no documentation}}

}}

Category:Medicine procedure templates