← Back to Classic ML Mind Map
⚡Flashcard Drill➔
📊 Classic MLID: roc-auc

ROC-AUC

🎯Core Definition
sweeping every classification threshold, plot the true positive rate TPR=TPTP+FNTPR = \frac{TP}{TP+FN} (= recall) on the y-axis against the false positive rate FPR=FPFP+TNFPR = \frac{FP}{FP+TN} (= 1 - specificity) on the x-axis; AUC is the area under this curve. As the threshold drops, TPR rises monotonically while FPR grows too; key points: (0,0) = predict all negative, (1,1) = predict all positive, and the diagonal TPR=FPRTPR = FPR is random guessing (AUC = 0.5). Probabilistic interpretation: AUC = the probability that a randomly chosen positive scores higher than a randomly chosen negative, AUC=P(s+>s−)AUC = P(s_{+} > s_{-}) — threshold-free and class-ratio-free, a pure ranking metric. Hand computation: 4 samples with scores [0.9, 0.7, 0.5, 0.3] and labels [+, -, +, -]: there are 2×2=42 \times 2 = 4 positive–negative pairs, and 3 of them (0.9, 0.7), (0.9, 0.3), (0.5, 0.3) are correctly ordered while only (0.5, 0.7) is inverted, so AUC=3/4=0.75AUC = 3/4 = 0.75.
💡Use Cases
binary classification and ranking-quality evaluation (credit, recsys, search); interview staple “how is AUC computed and interpreted”; also used for model selection and tuning since it needs no fixed threshold.
⚡Key Problems Solved
accuracy and PR require a chosen threshold to compare models, while AUC decouples ranking quality from the threshold — one number summarizing all thresholds; however, under extreme imbalance the FPR denominator FP+TNFP+TN is inflated by the huge negative population, so a few false positives barely move FPR and the ROC curve looks over-optimistic — switch to the PR curve (sensitive to the P=ρP = \rho baseline, exposing models whose ranking is polluted by negatives); AUC is class-ratio insensitive because it is rank-based, and it does not tell you the operating point — pair it with the threshold curve to pick TPR/FPR.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of ROC-AUC.
Use Cases
In production engineering, what are the primary use cases for ROC-AUC and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Hand-compute AUC: 4 samples with scores [0.9, 0.7, 0.5, 0.3] and labels [+, -, +, -], counting positive–negative pairs.
2
What is the probabilistic interpretation of AUC? Why is random guessing AUC ≈ 0.5 and a perfect ranking AUC = 1?
3
How to draw the ROC curve from model scores (threshold sweep updating TPR/FPR each step)? How is AUC computed by the trapezoid rule?
4
Why prefer the PR curve over ROC under extreme class imbalance, and why is AUC insensitive to the class ratio?
5
How to pick an operating threshold for a model with AUC = 0.75? Why doesn't AUC directly give a TPR/FPR working point?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "ROC-AUC"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardPrecision, Recall & F1Next Card →NDCG

🔗 More Classic ML Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/ML/card/roc-auc