# ROC curve and AUC

> Canonical: https://skillalmanac.com/glossary/roc-auc | Last verified: 2026-11-24 | Index status: index-eligible

A ROC curve plots true-positive rate against false-positive rate as a score threshold varies. Here AUC means area under that ROC curve, summarizing score ranking; it does not select an operating threshold or establish calibration.

Also called: ROC curve, AUC, AUC-ROC, auc roc, roc auc, area under the curve machine learning.

## In plain language

Many classifiers give each item a score, and you choose a cutoff above which you say yes. A ROC curve shows what happens at every possible cutoff at once: as you let in more true cases, how many false alarms come with them. AUC squeezes that curve into one number. Google's course describes it as the chance that the model scores a randomly chosen positive example above a randomly chosen negative one. The limits: AUC says nothing about which cutoff to use, and for data where one class is rare, Google suggests a precision-recall curve may be a better comparison.

## Technical definition

For binary evaluation with both classes represented, ROC AUC summarizes a score-based ROC curve. Pairwise ranking interpretation gives tied positive-negative scores half credit. Identify which class is positive and use its scores consistently. Multiclass and multilabel extensions require stated constructions and averaging. Partial AUC is a different summary over a specified false-positive range.

## How it shows up when you use agents

ROC AUC shows up when an agent evaluates a model that outputs scores: a fraud flag, a relevance ranker, or an LLM-based classifier that returns a probability. The agent reports one AUC figure, and it is easy to read too much into it. AUC measures how well scores rank positives above negatives. Google's course notes that the actual classification depends on the threshold you choose, so a good AUC does not mean the cutoff in production is a good one.

What breaks when it is misunderstood. Thresholding scores into yes-or-no predictions discards information about their original ranking. An AUC calculated from those coarse values cannot recover the full score-based ROC curve. Others quote AUC on data where one class is rare and skip the precision-recall view that Google suggests may compare models better there. See [Classification](/glossary/classification) and [Ground truth](/glossary/ground-truth).

Next actions. Ask the agent which column it passed as the score. Print the class counts. Pick a cutoff separately, using the cost of each kind of mistake, and check the test file with [split-leakage-check](/skills/skill-almanac/split-leakage-check).

## Worked example (illustrative)

Give a negative example score 0.1 and a positive example score 0.2. ROC AUC is 1 because their ranking is perfect. At threshold 0.5 both are predicted negative, so positive recall is zero. Thresholding also reduces these scores to [0,0], whose coarse ROC AUC is 0.5. This computed two-example illustration shows that ranking and a selected operating point answer different questions.

## Common confusions

- **ROC curve versus AUC.** AUC generically means area under a curve; on this page it means ROC AUC. Precision-recall area is a different quantity and uses a different curve.
- **Scores versus labels.** Use the original class scores to describe their ranking across thresholds. Final class labels retain only a thresholded distinction.
- **AUC versus accuracy.** AUC summarises the ROC curve, which Google's page describes as model performance across all thresholds. Accuracy is computed at one. They answer different questions.
- **Myth.** A high AUC means the model is good on any data. Google says ROC and AUC work well for roughly balanced classes and points to precision-recall curves for imbalanced data.

## Worked examples in this catalogue

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of train, validation and test files for duplicates, shared groups, time and label leakage, printed as JSON.

Why it exercises the concept: Use this check to look for leakage in the evaluation data before interpreting ROC AUC. It does not draw the ROC curve or compute AUC.

### [llm-eval-test-sets](https://skillalmanac.com/skills/skill-almanac/llm-eval-test-sets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill builds and validates an eval dataset for any LLM feature, with a checker for duplicates, missing graders, imbalance and leakage.

Why it exercises the concept: A ROC curve needs labelled examples and a score per example. Checking the labelled set for imbalance matters because Google ties the choice of ROC versus precision-recall to class balance. The skill does not compute AUC.

### [data-analysis-eda](https://skillalmanac.com/skills/skill-almanac/data-analysis-eda)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.

Why it exercises the concept: Counting rows per class comes before choosing between ROC and precision-recall. This skill profiles a table; it does not score a model.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Claude Code's overview page describes it as an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.

Why it exercises the concept: A coding agent can call scikit-learn's roc_auc_score on a small table of true labels and model scores, which shows that the function wants scores rather than yes-or-no predictions.

## Related terms

- [Classification](https://skillalmanac.com/glossary/classification.md)
- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Ground truth](https://skillalmanac.com/glossary/ground-truth.md)
- [Logistic regression](https://skillalmanac.com/glossary/logistic-regression.md)

## Sources

- [Classification: ROC and AUC](https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc), Google for Developers (Machine Learning Crash Course) (accessed 2026-11-24)
- [sklearn.metrics.roc_auc_score](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html), scikit-learn (accessed 2026-11-24)
- [3.4. Metrics and scoring: quantifying the quality of predictions (ROC curve)](https://scikit-learn.org/stable/modules/model_evaluation.html), scikit-learn (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
