ROC / AUC
Compute ROC points and AUC from binary scores.
About this tool
Enter one line per example as label,score where the label is 0 or 1 and the score is the model's predicted probability. You get the AUC, the area under the ROC curve, with the number of positives and negatives. 1.0 is perfect ranking and 0.5 is chance.
How to use
How it works
Examples are ranked by score. Sweeping the threshold from high to low traces the ROC curve of true-positive rate against false-positive rate, and the AUC is the trapezoidal area under it. It equals the probability that a random positive scores above a random negative.
AUC = ∫ TPR d(FPR) via trapezoids on ranked scores
Worked example
Four predictions
- Input
- 0,0.1 0,0.4 1,0.35 1,0.9
- Output
- AUC 0.75; positives 2; negatives 2
- Walkthrough
- Of the four positive-negative pairs, three are ranked correctly (0.9 beats both negatives, 0.35 beats 0.1) and one is not (0.35 is below 0.4), so 3/4 = 0.75.
Limitations
- Binary classification only.
- The ROC points and curve are not displayed, only the AUC and counts.
- Needs at least one positive and one negative example.
Questions
How do I calculate AUC?
What is a good AUC?
Does AUC depend on the threshold?
What does an AUC of 0.75 mean?
Features
- Trapezoidal AUC
- Counts positives and negatives
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Machine Learning for Everybody
freeCodeCamp.org
Accessible ML survey for AI calculator and metric tools.
Watch on YouTubeVectors | Essence of linear algebra
3Blue1Brown
Embeddings and vectors start with linear algebra intuition.
Watch on YouTube
- DeepLearning.AI
DeepLearning.AI
Courses and explainers for modern AI tooling.
- Hugging Face docs
Hugging Face
Model hub docs next to tokenizer and embedding helpers.