FA-100026 / Evaluation metric aggregation / Open access
Row-normalized confusion cells use column totals · case 01
Row-normalized confusion cells use column totals.
ROOT CAUSE
Each actual class row is divided by predicted support for its class.
THE FAILURE
Each actual class row is divided by predicted support for its class.
Unsuccessful approach: Adding one to every row denominator obscures perfect rows with small support.
Case contract
Return a square row-normalized confusion matrix in supplied label order; a zero-support row is all zeros.
Why this case matters
A small explicit evaluation contract makes aggregation behavior reproducible across labeled examples.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(truth, pred, labels):
return [[sum(a==i and b==j for a,b in zip(truth,pred))/(sum(b==i for b in pred) or 1) for j in labels] for i in labels]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('row distributions',solve([0,0,1],[0,1,1],[0,1]),[[.5,.5],[0,1]])
check('perfect diagonal',solve([0,1],[0,1],[0,1]),[[1,0],[0,1]])
check('absent row',solve([0],[0],[0,1]),[[1,0],[0,0]])
check('empty labels',solve([0],[0],[]),[])
check('empty data',solve([],[],[0,1]),[[0,0],[0,0]])
check('reversed label order',solve([N,N+1],[N+1,N],[N+1,N]),[[0,1],[1,0]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| row distributions | [[1.0, 1.0], [0.0, 0.5]] | [[0.5, 0.5], [0, 1]] | Failed |
| perfect diagonal | [[1.0, 0.0], [0.0, 1.0]] | [[1, 0], [0, 1]] | Passed |
| absent row | [[1.0, 0.0], [0.0, 0.0]] | [[1, 0], [0, 0]] | Passed |
| empty labels | [] | [] | Passed |
| empty data | [[0.0, 0.0], [0.0, 0.0]] | [[0, 0], [0, 0]] | Passed |
| reversed label order | [[0.0, 1.0], [1.0, 0.0]] | [[0, 1], [1, 0]] | Passed |
SHA-256 / 4738d6eac39c39010291ba1fe7e85478c61d54f82713b4f1d33165227aa11c36
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(truth, pred, labels):
return [[sum(a==i and b==j for a,b in zip(truth,pred))/(sum(a==i for a in truth)+1) for j in labels] for i in labels]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('row distributions',solve([0,0,1],[0,1,1],[0,1]),[[.5,.5],[0,1]])
check('perfect diagonal',solve([0,1],[0,1],[0,1]),[[1,0],[0,1]])
check('absent row',solve([0],[0],[0,1]),[[1,0],[0,0]])
check('empty labels',solve([0],[0],[]),[])
check('empty data',solve([],[],[0,1]),[[0,0],[0,0]])
check('reversed label order',solve([N,N+1],[N+1,N],[N+1,N]),[[0,1],[1,0]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| row distributions | [[0.3333333333333333, 0.3333333333333333], [0.0, 0.5]] | [[0.5, 0.5], [0, 1]] | Failed |
| perfect diagonal | [[0.5, 0.0], [0.0, 0.5]] | [[1, 0], [0, 1]] | Failed |
| absent row | [[0.5, 0.0], [0.0, 0.0]] | [[1, 0], [0, 0]] | Failed |
| empty labels | [] | [] | Passed |
| empty data | [[0.0, 0.0], [0.0, 0.0]] | [[0, 0], [0, 0]] | Passed |
| reversed label order | [[0.0, 0.5], [0.5, 0.0]] | [[0, 1], [1, 0]] | Failed |
SHA-256 / 4e7014a88bf63365699402c9a4ba65ac9a063805fc9175341b9c54b438ef087e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Inputs are finite toy labels and scores; this defines no benchmark protocol, production metric library, or model quality claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:30.810592+00:00.
Case digest / 779a7fd07bda86dd8fa8a5dd290a5c8ff88ba56c76887ec8d83f99bb08abbe66