Classification threshold sweep calculator

Calculate thresholds in entered order and TP counts with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use thresholds in entered order and TP counts to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Records: unique ID, finite decision score, binary label 0 or 1
A,0.9,1 B,0.8,0 C,0.7,1
Decision thresholds
.75,.85
Thresholds in entered order
0.75, 0.85
TP counts
1, 1
FP counts
1, 0
FN counts
1, 1
TN counts
0, 1
Precision
0.5, 1
Recall
0.5, 0.5
F1
0.5, 0.666666666667
Accuracy
0.333333333333, 0.666666666667

Try another scenario

Records: unique ID, finite decision score, binary label 0 or 1
A,0.9,1 B,0.8,0 C,0.85,1
Decision thresholds
.75,.85
Thresholds in entered order
0.75, 0.85
TP counts
2, 2
FP counts
1, 0
FN counts
0, 0
TN counts
0, 1
Precision
0.666666666667, 1
Recall
1, 1
F1
0.8, 1
Accuracy
0.666666666667, 1
Calculation method

Calculation method

Thresholds in entered order

Entered thresholds; score >= threshold predicts positive.

TP counts

True positives.

FP counts

False positives.

FN counts

False negatives.

TN counts

True negatives.

Precision

TP/(TP+FP); zero denominator returns 0.

Recall

TP/(TP+FN); zero denominator returns 0.

F1

2TP/(2TP+FP+FN); zero denominator returns 0.

Accuracy

(TP+TN)/number of records.

Symbols and units
a
Records: unique ID, finite decision score, binary label 0 or 1
b
Decision thresholds

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Supplied binary labels and scores only; thresholds are scenarios rather than automatically selected policy. Precision, recall and F1 use an explicit zero-denominator value of 0.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Further reading

scikit-learn: precision_recall_fscore_support ↗

Background reading; this does not imply endorsement or independent review of SumFizz.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.