Confidence score 2026-11-05
A confidence score is a numerical output used to express how strongly a system supports a prediction, particularly in statistical classification. Its meaning depends on the system: it may be an estimated probability, a distance from a decision boundary, or another score whose ordering is useful. A number between zero and one does not by itself establish a probability interpretation. Probability calibration concerns whether predicted probabilities agree with observed frequencies.[ref]
Consider a synthetic binary statistical classification example. Among independent test cases assigned a positive-class score near , suppose actually belong to that class. Their observed fraction agrees with the average predicted probability. If only belong to the positive class, the same scores overstate the observed positive frequency in this group. A reliability diagram groups predictions by their estimated probability and compares each group's mean prediction with its observed positive fraction. Finite groups have sampling variation, so agreement in one group is evidence to assess with its sample size, rather than a guarantee about each case.[ref]
Ordering and probability calibration answer different questions. For scores in , replacing every score by preserves their order but changes to . Thus an unchanged ranking can accompany very different probability statements. Conversely, a system assigning the overall positive fraction to every case can have useful aggregate probability calibration while failing to distinguish cases.
A confidence score can support a threshold for accepting a prediction or passing it to another process. Select and assess that threshold using examples separate from model fitting and representative of the intended inputs. A threshold does not establish its own error rate; observations on suitable test data supply that evidence. Distinguish a positive-class probability from the score of whichever class was selected: they are different quantities when the selected class changes.
Probability calibration 2026-11-05
Probability calibration means that reported probabilities agree with the frequencies of the outcomes they describe. For binary classification, let be the true label and let be the predicted positive-class probability. Population calibration is the conditional expectation condition
Among cases receiving a value near , the positive fraction should therefore be near , with uncertainty in any finite sample.[ref]
A simple example separates calibration from discrimination. Suppose the population has a positive fraction of and a predictor always reports . Then , so it is calibrated, although it cannot rank one case above another. Conversely, replacing a useful score by a strictly increasing transformation such as preserves ranking but generally changes the claimed probability. Thus ordering cases and attaching reliable numerical probabilities are different tasks.
A reliability diagram estimates the agreement by grouping predictions and comparing each group's mean prediction with its observed outcomes. Assess it using suitable held-out observations. A calibrator fitted to predictions on the same observations used to fit the original model can inherit an overly optimistic picture of performance; fitting and evaluation need appropriate separation.[ref]
A 2017 study found substantial confidence miscalibration in the evaluated neural networks, even when prediction accuracy improved. It also tested temperature scaling as a compact post-processing adjustment. These were empirical results on specified models and datasets, rather than a theorem that all neural networks are miscalibrated.[ref]
Reliability diagram 2026-11-05
A reliability diagram compares predicted probabilities with observed outcome frequencies to assess probability calibration. For the positive-class version of binary classification, partition observations into bins according to their predicted probabilities . For every nonempty bin, plot
where is for a positive outcome and otherwise. Agreement places the estimated points near the diagonal . Empty bins have no observed fraction and should not be plotted as zero.[ref]
Binning can hide important structure. Consider ten cases each assigned , of which eight are positive, and ten cases each assigned , of which two are positive. Separate bins give and , revealing strong disagreement. Merge all 20 cases into one bin: the mean prediction becomes and the positive fraction is . The single point lies on the diagonal despite the two-group discrepancy.
Figure 1.
Merging bins can hide disagreement in a reliability diagram.
Original synthetic binary classification example with the same 20 predictions and outcomes in both panels. Points show positive-class frequencies; the diagram does not establish a population guarantee. Details.
Report bin definitions and counts, since a point based on ten cases has different sampling uncertainty from one based on thousands. Some classification diagrams instead plot confidence in the selected label against the fraction of correct selections. That convention and the positive-class version answer related but distinct questions, so label the axes and the meaning of the outcome explicitly.[ref]