FA-99941 / Evaluation metric aggregation / Open access
Accuracy divides by predicted positives · case 01
Accuracy divides by predicted positives.
ROOT CAUSE
The denominator counts positive predictions rather than every labeled example.
THE FAILURE
The denominator counts positive predictions rather than every labeled example.
Unsuccessful approach: Adding one to the denominator distorts every nonempty sample.
Case contract
Return the fraction of equal positions in two equally sized label lists; empty lists yield 0.
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):
return sum(a==b for a,b in zip(truth,pred))/sum(x==1 for x in pred) if pred and sum(x==1 for x in pred) else 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed',solve([1,0,1],[1,1,0]),1/3)
check('all correct',solve([0,1],[0,1]),1)
check('all wrong',solve([0,0],[1,1]),0)
check('empty',solve([],[]),0)
check('singleton hit',solve([N],[N]),1)
check('singleton miss',solve([N],[N+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 |
|---|---|---|---|
| mixed | 0.5 | 0.3333333333333333 | Failed |
| all correct | 2.0 | 1 | Failed |
| all wrong | 0.0 | 0 | Passed |
| empty | 0 | 0 | Passed |
| singleton hit | 1.0 | 1 | Passed |
| singleton miss | 0 | 0 | Passed |
SHA-256 / 87f30007bfe2fb156aedadc3dd531ef57ebaf0a31b525178dc6da7d470d52166
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(truth, pred):
return sum(a==b for a,b in zip(truth,pred))/(len(truth)+1) if truth else 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed',solve([1,0,1],[1,1,0]),1/3)
check('all correct',solve([0,1],[0,1]),1)
check('all wrong',solve([0,0],[1,1]),0)
check('empty',solve([],[]),0)
check('singleton hit',solve([N],[N]),1)
check('singleton miss',solve([N],[N+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 |
|---|---|---|---|
| mixed | 0.25 | 0.3333333333333333 | Failed |
| all correct | 0.6666666666666666 | 1 | Failed |
| all wrong | 0.0 | 0 | Passed |
| empty | 0 | 0 | Passed |
| singleton hit | 0.5 | 1 | Failed |
| singleton miss | 0.0 | 0 | Passed |
SHA-256 / 1a54c5148bd226830003fe3410a3857bd45e0f5a7e7528d44c690b4a92e7e688
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:29.887459+00:00.
Case digest / dbdc701c6fd9f3331f26e311bff73fb443b3ca169d23ee483705ecd34df20d9d