FA-99956 / Evaluation metric aggregation / Open access
Micro precision omits false positives from the denominator · case 01
Micro precision omits false positives from the denominator.
ROOT CAUSE
The pooled precision is divided by true positives plus false negatives.
THE FAILURE
The pooled precision is divided by true positives plus false negatives.
Unsuccessful approach: Averaging per-class precision gives a macro value rather than a micro value.
Case contract
For binary one-vs-rest labels, micro precision equals correct positives divided by all predicted positives; zero denominator yields 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):
tp=sum(a==1 and b==1 for a,b in zip(truth,pred)); fn=sum(a==1 and b==0 for a,b in zip(truth,pred)); return tp/(tp+fn) if tp+fn else 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('false positive matters',solve([1,0,1],[1,1,0]),.5)
check('missed positive denominator',solve([1,1,1],[1,1,0]),1)
check('all positive correct',solve([1]*N,[1]*N),1)
check('no positive prediction',solve([1],[0]),0)
check('empty',solve([],[]),0)
check('only false alarms',solve([0]*N,[1]*N),0)
check('singleton false alarm',solve([0],[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 |
|---|---|---|---|
| false positive matters | 0.5 | 0.5 | Passed |
| missed positive denominator | 0.6666666666666666 | 1 | Failed |
| all positive correct | 1.0 | 1 | Passed |
| no positive prediction | 0.0 | 0 | Passed |
| empty | 0 | 0 | Passed |
| only false alarms | 0 | 0 | Passed |
| singleton false alarm | 0 | 0 | Passed |
SHA-256 / 66163dc567f3d48e2190c0a5576e7198cad91d84abbfa136122cf67cd0d7d742
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(truth, pred):
vals=[sum(a==k and b==k for a,b in zip(truth,pred))/sum(b==k for b in pred) if sum(b==k for b in pred) else 0 for k in (0,1)]; return sum(vals)/2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('false positive matters',solve([1,0,1],[1,1,0]),.5)
check('missed positive denominator',solve([1,1,1],[1,1,0]),1)
check('all positive correct',solve([1]*N,[1]*N),1)
check('no positive prediction',solve([1],[0]),0)
check('empty',solve([],[]),0)
check('only false alarms',solve([0]*N,[1]*N),0)
check('singleton false alarm',solve([0],[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 |
|---|---|---|---|
| false positive matters | 0.25 | 0.5 | Failed |
| missed positive denominator | 0.5 | 1 | Failed |
| all positive correct | 0.5 | 1 | Failed |
| no positive prediction | 0.0 | 0 | Passed |
| empty | 0.0 | 0 | Passed |
| only false alarms | 0.0 | 0 | Passed |
| singleton false alarm | 0.0 | 0 | Passed |
SHA-256 / 36808e3a7a79dc3bc289b10da8762583e07f8fa28afdeafcd93ebb34cd282f67
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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.920354+00:00.
Case digest / ddc67e6bc78694ffb044f1f62f066b76504921fd59cee8e238d6258cad7e1622