1 coral_logits_to_label

rri_metrics.coral.coral_logits_to_label(logits, *, threshold=0.5)

Decode CORAL logits into ordinal class labels via threshold counting.

CORAL models the probabilities P(y > k) for thresholds k=0..K-2. The predicted label is therefore the number of thresholds whose probability exceeds threshold (default 0.5).

1.1 Parameters

Name Type Description Default
logits Tensor Tensor["... K-1"] threshold logits. required
threshold float Probability threshold for counting P(y > k). 0.5

1.2 Returns

Name Type Description
Tensor Tensor["...", int64] predicted ordinal labels in [0, K-1].