Diagnostic Metrics, Anchoring Perspectives, and Curve Interpretations #
This guide summarizes the core diagnostic metrics based on anchoring logic (condition vs. prediction), and how these metrics relate to ROC and PR curves β especially under balanced vs. imbalanced class distributions.
πΉ Test-Centric Metrics (Anchored on Actual Condition) #
- Evaluates test performance, independent of disease prevalence.
- Anchor: Ground truth label (actual condition).
Positive-Focused (Sensitivity) #
- Fix actual Positive label.
- Incorrect prediction: False Negative (FN).
- Pair: (TP, FN)
- Sensitivity = TP / (TP + FN)
Negative-Focused (Specificity) #
- Fix actual Negative label.
- Incorrect prediction: False Positive (FP).
- Pair: (TN, FP)
- Specificity = TN / (TN + FP)
πΈ Outcome-Centric Metrics (Anchored on Prediction) #
- Evaluates usefulness of test result, dependent on both test performance and prevalence.
- Anchor: Test result (prediction output).
Positive-Focused (PPV / Precision) #
- Fix Positive prediction.
- Incorrect prediction: False Positive (FP).
- Pair: (TP, FP)
- Positive Predictive Value (PPV) = TP / (TP + FP)
Negative-Focused (NPV) #
- Fix Negative prediction.
- Incorrect prediction: False Negative (FN).
- Pair: (TN, FN)
- Negative Predictive Value (NPV) = TN / (TN + FN)
π Extension to ROC and PR Curves #
π― ROC Curve (Receiver Operating Characteristic) #
What it does: #
- Plots True Positive Rate (TPR) vs. False Positive Rate (FPR) across thresholds.
- TPR = Sensitivity = TP / (TP + FN)
- FPR = 1 β Specificity = FP / (FP + TN)
- These metrics are calculated by conditioning on the actual class labels, not predictions.
Anchoring View: #
- β Test-Centric / Condition-Anchored
- Starts from actual condition and evaluates how well the test distinguishes between classes.
- Independent of class imbalance in its calculation.
Use Case: #
- Suitable when both positive and negative classes are equally important.
- Can be misleading in highly imbalanced datasets (e.g., rare disease).
π Precision-Recall (PR) Curve #
What it does: #
- Plots Precision (PPV) vs. Recall (Sensitivity) across thresholds.
- Precision = TP / (TP + FP)
- Recall = TP / (TP + FN)
Anchoring View: #
- β Outcome-Centric / Prediction-Anchored
- Focuses on the modelβs positive predictions and how often they are correct.
- Particularly useful for evaluating performance on the positive class in imbalanced datasets.
Use Case: #
- Ideal for problems with class imbalance, where the positive class is rare but important (e.g., cancer detection, fraud, anomaly detection).
- Answers: βWhen the model says positive, can I trust it?β
π§ Summary of Metric Anchors and Curve Use #
Curve Type | Metrics Used | Anchored On | Evaluation Focus | Best For |
---|---|---|---|---|
ROC | TPR (Sensitivity), FPR | Actual condition | Discrimination ability | Balanced class settings |
PR | Precision (PPV), Recall | Prediction output | Precision of predictions | Imbalanced settings |
π‘ Takeaway: #
- ROC Curve is a test-centric (condition-anchored) tool: great for balanced data, focuses on test performance across thresholds.
- PR Curve is an outcome-centric (prediction-anchored) tool: best for imbalanced data, reflects how reliable positive predictions are.