The useful part, up front

What you’ll take away

  • Identical chosen labels can hide different probability errors.
  • Define the positive event before comparing probabilities with outcome frequencies.
  • Keep bin counts and group definitions; averaging can conceal opposite disagreements.
  • Brier and log loss assess probability predictions using different formulas and do not reduce calibration to one universal score.
  • A positive temperature preserves the winning class, but a useful fitted adjustment still needs independent evaluation.
01

The same eighty correct labels can carry very different probabilities

Imagine a program deciding whether a photograph contains a bicycle. We construct one hundred written test records: eighty say a bicycle is present, and twenty say it is absent. These are invented labels for a calculation, not photographs we submitted to a model. One prediction set assigns a 99 percent probability of “bicycle present” to every record. Another assigns 80 percent to every record. With a rule that predicts “present” at probabilities of at least 50 percent, both sets give exactly the same one hundred labels.

Both therefore get eighty labels right. Their accuracy is identical, but the probability statements differ. Among records assigned 80 percent, the constructed positive fraction is also 80 percent. Among records assigned 99 percent, it is still only 80 percent. Calibration concerns this relationship between probability estimates and outcome frequencies. [1] Accuracy alone cannot reveal it.

The distinction matters whenever a reader uses probabilities to compare uncertainty. A correct class label and a well-supported probability are different outputs. We will keep the labels, thresholds and arithmetic visible so that the examples explain the measurement rather than pretending to rank real AI products.

Merging bins can conceal opposite disagreements. Original records. The count-weighted absolute gap is 0.20 with two bins and zero after merging; the underlying predictions and labels are unchanged.
Original records. The count-weighted absolute gap is 0.20 with two bins and zero after merging; the underlying predictions and labels are unchanged. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
02

Name the event before interpreting the percentage

In these examples, the percentage always means the probability that a bicycle is present. It does not always mean the probability that the program's chosen label is correct. Consider a record assigned 20 percent. Our 50 percent decision rule chooses “bicycle absent”. The model's implied probability for that chosen negative label is 80 percent, because the two classes exhaust the possibilities in our setup.

A positive-class calibration chart must therefore compare the 20 percent value with the proportion of records that actually contain a bicycle. It should not compare that value with the proportion correctly labelled “absent”. The scikit-learn curve documentation explicitly defines its inputs as positive-class probabilities and its observed output as the fraction of positive labels. [2] Mixing these conventions can reverse the interpretation of a perfectly ordinary chart.

Record the positive label, the probability column and the decision rule before calculating anything. If a label is ambiguous or has been recorded incorrectly, a neat chart cannot repair it. The same caution applies when someone writes “I am 90 percent sure” in a chatbot answer: our examples concern defined classifier probabilities paired with binary outcomes, so that sentence needs its own defined evaluation before it can be interpreted in the same way.

03

A reliability point needs its count as well as its coordinates

A binary reliability diagram groups predictions and places each group using two numbers: its average predicted probability and its observed fraction of positive labels. Agreement places the point on the diagonal. In our opening example, the 80 percent predictions make a point at (0.8, 0.8). The 99 percent predictions make a point at (0.99, 0.8). Their identical accuracy does not put them in the same place. [1][2]

Keep the number of records behind each point. Eight positives out of ten and eight hundred out of a thousand both produce a fraction of 0.8. Yet changing one positive label to negative moves the first fraction to 0.7 and the second to 0.799. The first change is ten percentage points; the second is one tenth of a percentage point. These exact arithmetic changes illustrate why a plotted fraction without its count leaves out useful information.

They are not confidence intervals. The relationship between a sample and future cases needs its own assumptions, including how the records were selected. The curve documentation warns that more bins require more data and that empty bins are omitted. [2] An empty area of a chart is not evidence of perfect calibration there. Inspect where the predictions actually occur before drawing a conclusion about the full probability range.

04

Squared probability error distinguishes predictions that accuracy treats alike

The binary Brier score averages the squared distance between the predicted positive probability and the recorded outcome, with outcomes written as one or zero. Lower is better under this scoring rule. [3] For our eighty-positive, twenty-negative example, assigning 0.8 everywhere produces an average of [80 × (0.8 − 1)² + 20 × (0.8 − 0)²] ÷ 100 = 0.16.

Assigning 0.99 to the same records gives [80 × (0.99 − 1)² + 20 × (0.99 − 0)²] ÷ 100 = 0.1961. The very small errors on the eighty positive records do not compensate for the larger errors on the twenty negative records. Both sets still have 80 percent classification accuracy. The probability score has retained a distinction that thresholding discarded.

In this constant-probability example, moving from 0.8 to 0.99 adds exactly (0.99 − 0.8)² = 0.0361 to the average squared error. That is a useful calculation, but do not turn it into the general claim that every lower Brier score proves better calibration. The user guide explains that the score also reflects how informative the predictions are and the outcome variability. [1] We will construct a separate example that makes this limit visible.

A pooled match can hide batch differences. Original two-batch construction. Every prediction is p = 0.8, but conditioning on batch changes the observed fraction. No real population is represented.
Original two-batch construction. Every prediction is p = 0.8, but conditioning on batch changes the observed fraction. No real population is represented. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
05

Log loss gives confidently wrong probabilities a different penalty

Another probability score uses the negative natural logarithm of the probability assigned to the outcome that actually occurred. This is binary log loss. [4] If a positive record was assigned 0.8, its loss is −ln(0.8), about 0.22314. If a negative record was assigned that same positive probability, the probability assigned to its actual outcome is 0.2, so its loss is about 1.60944.

Average those values across our eighty positive and twenty negative records, and the loss is about 0.50040. With a positive probability of 0.99 everywhere, the average becomes about 0.92907. The twenty negative records were each assigned only a one percent probability of their actual outcome, so their individual losses are much larger. Again, the chosen labels and their 80 percent accuracy have not changed.

Log loss and Brier loss use different penalty shapes. Their numerical values should not be compared as though one were simply a percentage version of the other. Both require a declared probability event and correct outcome pairing. Our calculations use probabilities strictly between zero and one. The documented software clips extreme probabilities for numerical reasons; that implementation detail is separate from the ordinary mathematical formula used for these interior values. [4]

06

One large bin can hide two opposite disagreements

Construct a new set of one hundred records. Fifty receive a positive probability of 0.2, but twenty of those fifty are positive: their observed fraction is 0.4. The other fifty receive 0.8, but thirty of them are positive: their observed fraction is 0.6. Each group differs from its assigned probability by twenty percentage points, in opposite directions.

Now put all one hundred predictions into one bin. The average probability is (50 × 0.2 + 50 × 0.8) ÷ 100 = 0.5. The positive fraction is also (20 + 30) ÷ 100 = 0.5. The single plotted point sits exactly on the diagonal, concealing the two disagreements that were visible when the groups stayed separate.

For an explicit summary, define the gap as the count-weighted average of each bin's absolute difference. The two-bin result is 0.5 × 0.2 + 0.5 × 0.2 = 0.2; the one-bin result is zero. The predictions did not improve. Only the grouping changed. The curve documentation makes bin count and strategy explicit choices. [2] Keep those choices with a reported chart or gap, and inspect more than one coarse summary before treating a diagonal point as strong evidence.

Matching frequencies does not imply equal information. Original shared label table: 10 positives in the first 50 records and 40 in the next 50. A p = 0.5 tie predicts positive. Both prediction sets match their issued probability groups.
Original shared label table: 10 positives in the first 50 records and 40 in the next 50. A p = 0.5 tie predicts positive. Both prediction sets match their issued probability groups. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
07

A matching overall percentage can still miss a difference between batches

Grouping only by predicted probability can also hide differences between kinds of records. Return to predictions of 0.8 for everyone. This time, define two batches of fifty. Batch A contains forty-five positives, a fraction of 0.9. Batch B contains thirty-five positives, a fraction of 0.7. Together they contain eighty positives out of one hundred, so the overall probability and positive fraction both remain 0.8.

The single overall point is unchanged, but neither batch matches it. The prediction understates the positive frequency in A by ten percentage points and overstates it in B by ten percentage points. This is an original counterexample showing why agreement after one kind of grouping does not establish agreement after every other useful grouping.

The batch labels here are invented. In a real evaluation, a meaningful grouping could follow a documented capture condition or a defined use case, provided the records and outcomes support that question. Keep the group definition, count and result together. A small group may be noisy, and repeatedly searching many groupings can produce striking patterns by chance. The example calls for a clear question and further evidence; it does not identify a real system's failure or declare that every possible subgroup must be inspected identically.

08

Matching observed frequencies does not tell the whole story about usefulness

Consider another hundred-record table with fifty positives overall. Its first fifty records contain ten positives; its second fifty contain forty. A prediction set that assigns 0.5 to everyone matches the overall positive fraction exactly. A second set assigns 0.2 to the first group and 0.8 to the second. Those two probability groups also match their respective observed fractions exactly.

Both sets therefore agree with the frequencies at the probability values they issue in this constructed sample. The second set is more informative about differences between records. Under our stated rule that a 0.5 tie predicts positive, the constant set gets fifty labels right. The varying set predicts negative for the first group and positive for the second, getting forty right in each group: eighty in total.

Their Brier scores differ too: 0.25 for the constant set and 0.16 for the varying set. This is the promised example of why a probability score and a calibration diagnosis are not interchangeable. The official guide makes that broader distinction between reliability and discriminatory information. [1] Here the full table shows the mechanism directly. A useful evaluation asks both whether the stated probabilities agree with outcomes and whether the predictions distinguish cases in a way relevant to the task.

09

A positive temperature can change probabilities without changing the winner

Temperature scaling changes the conversion from a model's numerical class scores, called logits, into probabilities. The documented form divides the logits by a positive temperature before applying softmax. [1] To see the effect without training anything, use two invented logits: ln(4) for “bicycle present” and zero for “absent”. At temperature one, the positive probability is 4 ÷ (4 + 1) = 0.8.

At temperature two, the corresponding ratio becomes 2 ÷ (2 + 1), about 0.66667. At temperature one half, it becomes 16 ÷ (16 + 1), about 0.94118. The positive class wins all three times. A common positive scaling preserves which logit is largest, while the probabilities change. That explains how a calibration procedure can alter probability quality without changing the selected class.

Our three temperatures are chosen examples, not fitted improvements. In the documented calibration procedure, the temperature is learned using a separate calibration set. [1] The 2017 paper by Guo and colleagues reported useful temperature-scaling results on the datasets it studied. [5] That historical finding does not make every chosen temperature beneficial or guarantee that a present-day model will be calibrated on a different population.

Positive temperature changes probabilities but preserves the winner. Original two-logit calculation: z_positive = ln(4), z_negative = 0. Probabilities use softmax(z/T). Temperatures are chosen illustrations, not fitted improvements.
Original two-logit calculation: z_positive = ln(4), z_negative = 0. Probabilities use softmax(z/T). Temperatures are chosen illustrations, not fitted improvements. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
10

Use different evidence for fitting the adjustment and judging it

The opening table was designed to make the arithmetic transparent. Once we know it contains eighty positives, assigning 0.8 everywhere matches that table's overall frequency. Reporting this match as proof that we discovered a reliable predictor would confuse using the answers with demonstrating a result on new cases. The example establishes a calculation, not a prediction achievement.

In an actual calibration workflow, the classifier has training data, the probability adjustment has fitting data, and the final assessment needs evidence appropriate to the intended use. The official guide explains why calibration fitting should use predictions from data independent of the classifier's training data, and describes held-out or cross-validation approaches. [1] A final check should also remain separate from choices tuned using its own answers. Repeatedly changing the adjustment after inspecting the test results turns those results into development information.

Keep the model version, adjustment method, fitted parameters, record selection and evaluation date together. If the kinds of incoming images change, an old reliability plot remains evidence about its original records. It does not automatically describe the new ones. This is why a calibration result should name its population and conditions instead of becoming a permanent confidence label attached to the model's name.

11

Read the probability report as a set of connected questions

Begin with the event: what does the positive label mean, and which probability belongs to it? Then inspect the outcomes, record count and decision rule. Accuracy tells you about the resulting labels. A reliability diagram compares average probabilities with observed positive fractions. Brier and log loss retain probability information using different formulas. Their definitions and conventions belong beside the values. [2][3][4]

Our examples show why the rest of the record matters. Two sets can share 80 percent accuracy but score 0.16 and 0.1961 under the binary Brier formula. Merging two bins can reduce a declared gap from 0.2 to zero without changing a prediction. Two batches can disagree in opposite directions while their pooled fraction matches. A constant 0.5 prediction can agree with an overall frequency while failing to distinguish records as well as more informative predictions do.

Finally, ask how any adjustment was fitted and where it was checked. Keep the original probabilities, labels and group assignments so another person can reproduce the report. A meaningful uncertainty assessment connects each conclusion to its actual calculation and data. It leaves room to say that a label was correct, a probability was overconfident on a sample, or an overall average missed a subgroup difference without treating those observations as the same result.

Keep the probability assessment reproducible. Proposed evaluation record. The original probability/label pairs allow another reader to reconstruct the summaries and their scope.
Proposed evaluation record. The original probability/label pairs allow another reader to reconstruct the summaries and their scope. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
Follow the evidence

Sources & further reading

Explore the references behind this guide. External pages may change after our review.

  1. 1.16. Probability calibration — scikit-learn 1.9.1 documentation
    scikit-learn developers · Accessed 6 Nov 2026
  2. calibration_curve — scikit-learn 1.9.1 documentation
    scikit-learn developers · Accessed 6 Nov 2026
  3. brier_score_loss — scikit-learn 1.9.1 documentation
    scikit-learn developers · Accessed 6 Nov 2026
  4. log_loss — scikit-learn 1.9.1 documentation
    scikit-learn developers · Accessed 6 Nov 2026
  5. On Calibration of Modern Neural Networks
    Proceedings of Machine Learning Research · Accessed 6 Nov 2026

Article updated 7 Nov 2026.

Found something we should revisit?

Good explanations get better with thoughtful feedback.

Suggest a correction