Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyhealth/metrics/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _ECE_classwise(prob:np.ndarray, label_onehot:np.ndarray, bins=20, threshold=
return summs, class_losses

def ece_confidence_multiclass(prob:np.ndarray, label:np.ndarray, bins=20, adaptive=False):
"""Expected Calibration Error (ECE).
r"""Expected Calibration Error (ECE).

We group samples into 'bins' basing on the top-class prediction.
Then, we compute the absolute difference between the average top-class prediction and
Expand Down