Calculate the diagnostic odds ratio to summarize a classifier's discriminative power.
The Diagnostic Odds Ratio (DOR) is a single-number summary of how well a classifier discriminates between positive and negative cases: DOR = (TP × TN) / (FP × FN). It expresses the odds of a positive prediction occurring in someone who truly has the condition, relative to the odds of a positive prediction in someone who doesn't. A DOR of 1 means the test has no discriminative value; higher values indicate better discrimination, and DOR is undefined (infinite) when there are zero false positives or false negatives.
DOR = (TP * TN) / (FP * FN)
A DOR of 1 means the odds of a positive test result are the same whether or not the condition is truly present, indicating the test provides no discriminative information at all.
If either FP or FN is zero, the denominator becomes zero and DOR is mathematically undefined (infinite) — this happens with a 'perfect' classifier on the given data, and in practice a small correction (like adding 0.5 to each cell) is sometimes applied to avoid this.
DOR combines both sensitivity and specificity information into one number via the odds ratio, which is convenient for ranking classifiers, but it can obscure whether performance is driven by the positive or negative class, so it's best used alongside — not instead of — sensitivity and specificity.