Model Evaluation & Metrics
Beyond Accuracy
Why accuracy isn't enough
At 50/50 balance, the "always predict majority" trick gives only 50% accuracy. But with imbalanced data, accuracy becomes a misleading metric. Try dragging toward 90%+.
Step 1 of 6: Beyond Accuracy
Why accuracy isn't enough
At 50/50 balance, the "always predict majority" trick gives only 50% accuracy. But with imbalanced data, accuracy becomes a misleading metric. Try dragging toward 90%+.
Step 2 of 6: The Confusion Matrix
True/false × positive/negative
TP (correct positive) and TN (correct negative) are good. FP (false alarm) and FN (missed detection) are errors. Balanced threshold: good tradeoff between FP and FN.
Step 3 of 6: Precision & Recall
The tradeoff
Precision = "Of those I predicted positive, how many were correct?" (38/53). Recall = "Of all actual positives, how many did I find?" (38/50). They trade off — you can't maximize both at once.
Step 4 of 6: F1 Score
The harmonic mean
The F1 score is the harmonic mean of precision and recall: 2PR/(P+R) = 0.738. The peak F1 = 0.794 is at θ ≈ 0.35. Try moving the threshold there.
Step 5 of 6: ROC Curve
True positive rate vs false positive rate
The ROC curve plots TPR vs FPR at every threshold. The AUC (area under curve) = 0.874 — measures overall model quality. AUC = 1.0 is perfect, 0.5 is random. This model performs well above random.
Step 6 of 6: Regression Metrics
MSE, MAE, R²
MSE penalizes large errors heavily. MAE is more robust to outliers. R² = -0.521 — the fraction of variance explained. A linear fit may underfit — try increasing complexity.