{"abstract":"Micro precision omits false positives from the denominator.","category":"Evaluation metric aggregation","checks":7,"contract":"For binary one-vs-rest labels, micro precision equals correct positives divided by all predicted positives; zero denominator yields 0.","contract_signature":"truth, pred","evaluation_group":"w3-eval-micro-precision","failed_approach":"Averaging per-class precision gives a macro value rather than a micro value.","family":"w3-evaluation-metric-aggregation-micro-precision","id":"FA-99956","implementations":{"attempt":{"sha256":"36808e3a7a79dc3bc289b10da8762583e07f8fa28afdeafcd93ebb34cd282f67","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, pred):\n    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\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('false positive matters',solve([1,0,1],[1,1,0]),.5)\ncheck('missed positive denominator',solve([1,1,1],[1,1,0]),1)\ncheck('all positive correct',solve([1]*N,[1]*N),1)\ncheck('no positive prediction',solve([1],[0]),0)\ncheck('empty',solve([],[]),0)\ncheck('only false alarms',solve([0]*N,[1]*N),0)\ncheck('singleton false alarm',solve([0],[1]),0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"66163dc567f3d48e2190c0a5576e7198cad91d84abbfa136122cf67cd0d7d742","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, pred):\n    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\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('false positive matters',solve([1,0,1],[1,1,0]),.5)\ncheck('missed positive denominator',solve([1,1,1],[1,1,0]),1)\ncheck('all positive correct',solve([1]*N,[1]*N),1)\ncheck('no positive prediction',solve([1],[0]),0)\ncheck('empty',solve([],[]),0)\ncheck('only false alarms',solve([0]*N,[1]*N),0)\ncheck('singleton false alarm',solve([0],[1]),0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-evaluation-metric-aggregation-micro-precision","generated_at":"2026-09-30T16:48:29.920354+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small explicit evaluation contract makes aggregation behavior reproducible across labeled examples.","root_cause":"The pooled precision is divided by true positives plus false negatives.","sha256":"ddc67e6bc78694ffb044f1f62f066b76504921fd59cee8e238d6258cad7e1622","title":"Micro precision omits false positives from the denominator · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":30.497,"exit_code":1,"observations":[{"actual":0.25,"check":"false positive matters","expected":0.5,"passed":false},{"actual":0.5,"check":"missed positive denominator","expected":1,"passed":false},{"actual":0.5,"check":"all positive correct","expected":1,"passed":false},{"actual":0.0,"check":"no positive prediction","expected":0,"passed":true},{"actual":0.0,"check":"empty","expected":0,"passed":true},{"actual":0.0,"check":"only false alarms","expected":0,"passed":true},{"actual":0.0,"check":"singleton false alarm","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"false positive matters\", \"actual\": 0.25, \"expected\": 0.5, \"passed\": false}, {\"check\": \"missed positive denominator\", \"actual\": 0.5, \"expected\": 1, \"passed\": false}, {\"check\": \"all positive correct\", \"actual\": 0.5, \"expected\": 1, \"passed\": false}, {\"check\": \"no positive prediction\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"only false alarms\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"singleton false alarm\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.475,"exit_code":1,"observations":[{"actual":0.5,"check":"false positive matters","expected":0.5,"passed":true},{"actual":0.6666666666666666,"check":"missed positive denominator","expected":1,"passed":false},{"actual":1.0,"check":"all positive correct","expected":1,"passed":true},{"actual":0.0,"check":"no positive prediction","expected":0,"passed":true},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":0,"check":"only false alarms","expected":0,"passed":true},{"actual":0,"check":"singleton false alarm","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"false positive matters\", \"actual\": 0.5, \"expected\": 0.5, \"passed\": true}, {\"check\": \"missed positive denominator\", \"actual\": 0.6666666666666666, \"expected\": 1, \"passed\": false}, {\"check\": \"all positive correct\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"no positive prediction\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"only false alarms\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"singleton false alarm\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}