incerto.calibration.smooth_ece

Contents

incerto.calibration.smooth_ece#

incerto.calibration.smooth_ece(logits, labels)[source]#

Smooth Expected Calibration Error (smECE).

A binning-free calibration measure based on kernel smoothing. The bandwidth is selected automatically via a fixed-point condition, yielding a consistent calibration measure.

Reference:

Blasiok & Nakkiran, “Smooth ECE: Principled Reliability Diagrams via Kernel Smoothing” (ICLR 2024)

Parameters:
  • logits (Tensor) – Model logits (N, C)

  • labels (Tensor) – True labels (N,)

Return type:

float

Returns:

smECE score (float in [0, 1])