
This implies that the accuracy of the model should be reflective of its confidence in the prediction. Deviation from it leads to under-confident (accuracy > predicted confidence) or over-confident (accuracy < predicted confidence) models. A common metric often used to measure calibration in practice is the Expected calibration error [1]}. It is measured as the difference between the accuracy and predicted confidences computed over several bins. Formally,
\(ECE \triangleq \sum _m^{M} \frac{\vert B_m \vert }{L} \vert A_m - {C}_m \vert ,\) 
