{"abstract":"Support weighted recall divides by label count.","category":"Evaluation metric aggregation","checks":6,"contract":"Return support-weighted recall for supplied labels; labels without support contribute zero; no support returns 0.","contract_signature":"truth, pred, labels","evaluation_group":"w3-eval-weighted-recall","failed_approach":"Weighting by predicted counts shifts emphasis toward overpredicted labels.","family":"w3-evaluation-metric-aggregation-weighted-recall","id":"FA-99961","implementations":{"attempt":{"sha256":"556cab67d59d138a74afce695e71cd3df8894c1d2e4b250aae24fc521a1cd22b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, pred, labels):\n    return sum((sum(a==k and b==k for a,b in zip(truth,pred))/sum(a==k for a in truth) if sum(a==k for a in truth) else 0)*sum(b==k for b in pred) for k in labels)/len(truth) if truth else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('support weighted',solve([0,0,0,1],[0,1,1,1],[0,1]),.5)\ncheck('perfect',solve([0,1],[0,1],[0,1]),1)\ncheck('all wrong',solve([0,1],[1,0],[0,1]),0)\ncheck('empty labels',solve([0],[0],[]),0)\ncheck('empty data',solve([],[],[0,1]),0)\ncheck('single class',solve([N]*N,[N]*N,[N]),1)\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":"30dfa707be8aac2097c6e75ac715e5330cbbb3aab69107b2f6d82380eb42a339","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(truth, pred, labels):\n    return sum(sum(a==k and b==k for a,b in zip(truth,pred))/sum(a==k for a in truth)*sum(a==k for a in truth) for k in labels)/len(labels) if labels and truth else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('support weighted',solve([0,0,0,1],[0,1,1,1],[0,1]),.5)\ncheck('perfect',solve([0,1],[0,1],[0,1]),1)\ncheck('all wrong',solve([0,1],[1,0],[0,1]),0)\ncheck('empty labels',solve([0],[0],[]),0)\ncheck('empty data',solve([],[],[0,1]),0)\ncheck('single class',solve([N]*N,[N]*N,[N]),1)\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-weighted-recall","generated_at":"2026-09-30T16:48:30.355570+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 weighted sum uses the number of classes instead of total support.","sha256":"ffed7376318af49ff220b0adb1aa03f67990db8e1c2c41b4a45c0f2163d82ee3","title":"Support weighted recall divides by label count · 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.578,"exit_code":1,"observations":[{"actual":0.8333333333333334,"check":"support weighted","expected":0.5,"passed":false},{"actual":1.0,"check":"perfect","expected":1,"passed":true},{"actual":0.0,"check":"all wrong","expected":0,"passed":true},{"actual":0.0,"check":"empty labels","expected":0,"passed":true},{"actual":0,"check":"empty data","expected":0,"passed":true},{"actual":1.0,"check":"single class","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"support weighted\", \"actual\": 0.8333333333333334, \"expected\": 0.5, \"passed\": false}, {\"check\": \"perfect\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"all wrong\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty labels\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty data\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"single class\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.426,"exit_code":1,"observations":[{"actual":1.0,"check":"support weighted","expected":0.5,"passed":false},{"actual":1.0,"check":"perfect","expected":1,"passed":true},{"actual":0.0,"check":"all wrong","expected":0,"passed":true},{"actual":0,"check":"empty labels","expected":0,"passed":true},{"actual":0,"check":"empty data","expected":0,"passed":true},{"actual":1.0,"check":"single class","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"support weighted\", \"actual\": 1.0, \"expected\": 0.5, \"passed\": false}, {\"check\": \"perfect\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"all wrong\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty labels\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty data\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"single class\", \"actual\": 1.0, \"expected\": 1, \"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."}}