1 rri_metrics.coral
rri_metrics.coral
CORAL ordinal regression utilities for RRI-derived labels.
This module uses the MIT-licensed reference implementation from coral-pytorch.
VIN-NBV trains the RRI predictor via ordinal classification and uses a ranking-aware loss (CORAL) to penalize distant misclassifications more strongly than nearby ones. The expected value decoded from CORAL logits is a one-step ranking proxy; oracle RRI and endpoint target-quality metrics remain the geometry-grounded evaluation signals.
1.1 Classes
| Name | Description |
|---|---|
| MonotoneBinValues | Learnable, monotone bin representatives u_k. |
| CoralLayer | CORAL output layer with shared weights and per-threshold biases. |
1.2 Functions
| Name | Description |
|---|---|
| coral_loss | Compute CORAL loss (sum of binary cross-entropies over thresholds). |
| coral_logits_to_prob | Convert CORAL logits to a proper class distribution. |
| coral_random_loss | Expected CORAL loss for a random classifier. |
| coral_expected_from_logits | Compute expected ordinal value from CORAL logits. |
| coral_logits_to_label | Decode CORAL logits into ordinal class labels via threshold counting. |
| coral_monotonicity_violation_rate | Compute the fraction of monotonicity violations in CORAL probabilities. |