Discrimination, Calibration, and Ranking: A Unified Matrix Framework
Organizations: Centro de Matemática, Computação e Cognição Universidade Federal do ABC (UFABC) Santo André, SP, Brazil · Universidade Federal do ABC (UFABC) Santo André, SP, Brazil
Abstract
Discrimination, calibration, and ranking are the three pillars of classifier evaluation, yet no single algebraic language spans all three. A recent indicator-matrix account unifies discrimination measures (precision, recall, F1, Matthews correlation) across binary, multiclass, multilabel and related settings, using Boolean cell operations on indicator label matrices, generalised to soft labels by t-norms. Calibration measures (Brier score, log-loss) and ranking measures (nDCG, AUC) fall outside it. We close the gap with two further classes of cell operators: deviation operators phi(y - yhat), which give a Calibration Framework, and rank- and slice-dependent operators (positional gains for DCG, column concordance cells for AUC), which give a Ranking Framework. Both inherit the micro/macro/exemplar aggregation architecture. For calibration, the three Brier aggregations collapse to one scalar; the Murphy decomposition holds in matrix form (unbinned, binned and isotonic); and, within the Brier-type class-indexed family, a measure is skew-invariant if and only if it depends only on the class-conditional errors alpha_j and beta_j, the calibration analogues of recall and specificity. For ranking, raw DCG collapses across aggregations while nDCG does not; per-class nDCG and per-class AUC are related by a row-column duality; micro-AUC differs from pooled ROC-AUC; raw positional scores are never strictly proper, and nDCG and AUC need not be proper. The skew-invariant per-class building blocks share one class-conditional expectation template. Experiments on two multilabel benchmarks illustrate the distinctions. Many of the results are machine-checked in Lean 4; the proofs, the experiments and the aggmetrics.scores package are public: https://github.com/rcprati/discrimination-calibration-ranking
Figures & tables
| Term | Column axis ( ) | Row axis ( ) | Interpretation |
|---|---|---|---|
| UNC | Inherent difficulty: class prevalence (col) vs. example label density (row) | ||
| RES | Spread of the label frequency across the groups of equal predicted value in a column | Same, across the groups of equal predicted value in a row | Discrimination: separates pos. from neg. labels? |
| REL | Mean-sq. calibration error per class | Mean-sq. calibration error per example | Calibration: confidence matches frequency? |
| Aggregation | Raw DCG | Normalisation | Normalised nDCG |
|---|---|---|---|
| (micro) | |||
| (class) | (novel) | ||
| (exemplar) | (standard) |
| Property | Discrimination | Calibration | Ranking |
|---|---|---|---|
| Operator dependency | Pointwise | Pointwise | Row (nDCG) / Col (AUC) |
| Collapses (raw cell sums / normalised ratios) | Yes / No | Yes / Yes | Yes / No |
| Strictly proper scoring rule | Depends on loss (Brier: strict; MAE: not proper) | nDCG: not generally proper; AUC: non-strict and conditional | |
| Skew-invariant basis | Recall, specificity | , | |
| Common structure of basis | Class-conditional rates | Positive/negative conditional error means | Positive-class conditional rank quality |
| Hard-prediction limit | Precision, recall | Hamming loss (complement: label accuracy) | Precision@ (indicator weight) |
| Property | Discrimination | Calibration | Ranking |
|---|---|---|---|
| Pointwise in | ✓ | ✓ | |
| for all | ✓ | n/a ∗ | |
| Strictly proper scoring rule | ✓ ‡ | † | |
| Marginal consistency (Thm. 8 , Prati 2027 ) | only | n/a | n/a |
| Micro = macro = exemplar (scalar) | ✓ | raw ✓; norm. | |
| Skew-invariant measures exist | ✓ | ✓(via ) | ✓(per-class) § |
| Reliability (lower is better) | Resolution (higher is better) | |||
|---|---|---|---|---|
| Classifier | binned | isotonic | binned | isotonic |
| LR | 0.0024 | 0.0053 | 0.0217 | 0.0255 |
| RF | 0.0039 | 0.0067 | 0.0277 | 0.0317 |
| GBT | 0.0040 | 0.0063 | 0.0265 | 0.0293 |
| MLP (uncal.) | 0.0056 | 0.0081 | 0.0266 | 0.0295 |
| MLP (cal.) | 0.0025 | 0.0056 | 0.0257 | 0.0297 |
Classification
Classification maps observations to discrete labels, including familiar, unknown, hierarchical, or multiple categories.
See all 425 papers