About Precision-Recall Curve Calculator
This precision-recall curve calculator plots precision against recall for your scores and reports average precision, with a dashed line for the no-skill baseline. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The no-skill baseline is the share of positives in the data: a classifier that guesses at random has that precision at every recall. On the imbalanced example here only 5 of 50 cases are positive, so the baseline is 0.10. Its ROC AUC is 0.79, but its average precision is only 0.43, because many negatives outscore the positives.
The curve is a staircase because precision changes only when the threshold crosses a case. A sharp drop at high recall tells you how many false alarms you accept to find the last positives.
How to use Precision-Recall Curve Calculator
- Paste your data as score,label lines. A label is 1 for the positive class and 0 for the negative class; true and false also work.
- Or tap an example to load a good model, a weak model, an imbalanced set or the classic four-point example.
- Read the AUC and average precision in the result card.
- Switch between the ROC curve and the precision-recall curve.
- Move the threshold slider, or press the best-threshold button, to see the confusion matrix and metrics at that cut-off.
- Open the curve points table to see every threshold, false positive rate, true positive rate and precision.
Features
- ROC curve with the chance diagonal, shaded area and a marker for your chosen threshold.
- AUC by the trapezoid rule, with ties between a positive and a negative counted as half.
- Precision-recall curve with the no-skill baseline, and average precision.
- A threshold slider with the live confusion matrix, accuracy, precision, recall, false positive rate, F1 and MCC.
- The best threshold by Youden's J statistic in one tap.
- Up to 20,000 rows, with a table of the curve points.
- A plain-English reading of what the AUC means for your model.
Worked examples
The imbalanced sample: 50 cases, 5 positive gives average precision 0.433, AUC 0.787
The ROC AUC looks stronger than the average precision because the 45 negatives keep the false positive rate small even when many are scored high.
Privacy: how it works
- Your scores and labels are processed by code running in your browser tab. They are never sent to Ulkaa or anyone else.
Tips
- Scores need not be probabilities. Any number where higher means more likely positive works, because only the ranking matters.
- The AUC depends only on the order of the scores. Multiplying all scores by a constant changes nothing.
- Tied scores are handled as one step. A tie between a positive and a negative cuts a diagonal and counts half.
- Both classes must appear in the data, or the rates are undefined and the tool asks for more.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your scores and labels are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your scores and labels are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
When is the precision-recall curve better than ROC?
When positives are rare and you care about the quality of positive predictions. Precision shows the false alarms that the false positive rate hides.
What is the no-skill line?
A horizontal line at the proportion of positive cases. A model must be above it to be better than guessing.
More ROC Curve and AUC Calculator pages
- ROC Curve and AUC CalculatorPaste model scores and true labels to draw the ROC curve, find the AUC and explore thresholds.
- ROC Curve CalculatorPaste scores and labels to plot the ROC curve and move along it with a threshold slider.
- AUC CalculatorPaste scores and labels and get the area under the ROC curve.
- Average Precision CalculatorGet the average precision of a ranked list of predictions.
- Optimal Classification Threshold FinderFind the cut-off that best balances true positives and false positives.
- ROC AUC for Imbalanced DataCheck what a ROC AUC means when only a few cases are positive.