FAILURE MAP
← Case archive

FA-99951 / Evaluation metric aggregation / Open access

Macro recall weights labels by support · case 01

Macro recall weights labels by support.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Recall values are pooled through their counts, giving common labels extra weight.

THE FAILURE

Recall values are pooled through their counts, giving common labels extra weight.

Unsuccessful approach: Including absent labels as zero changes the explicitly requested label set.

Case contract

Average per-label recall over the supplied labels; a label with no actual examples has recall 0; empty label list returns 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, labels):
    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 for k in labels)/len(truth) if truth else 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unequal supports',solve([0,0,0,1],[0,0,1,1],[0,1]),(2/3+1)/2)
check('perfect',solve([0,1],[0,1],[0,1]),1)
check('absent requested label',solve([0],[0],[0,1]),.5)
check('empty labels',solve([0],[0],[]),0)
check('empty data',solve([],[],[0,1]),0)
check('all missed',solve([N]*N,[0]*N,[N]),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 fixtureActualExpectedOutcome
unequal supports0.416666666666666630.8333333333333333Failed
perfect1.01Passed
absent requested label1.00.5Failed
empty labels0.00Passed
empty data00Passed
all missed0.00Passed

SHA-256 / 19468ae21d0a8fc50ac823f07d527560df3bcb68e71ea8f618c211aeeee122df

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(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 for k in labels+[99])/len(labels+[99]) if labels else 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unequal supports',solve([0,0,0,1],[0,0,1,1],[0,1]),(2/3+1)/2)
check('perfect',solve([0,1],[0,1],[0,1]),1)
check('absent requested label',solve([0],[0],[0,1]),.5)
check('empty labels',solve([0],[0],[]),0)
check('empty data',solve([],[],[0,1]),0)
check('all missed',solve([N]*N,[0]*N,[N]),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 fixtureActualExpectedOutcome
unequal supports0.55555555555555550.8333333333333333Failed
perfect0.66666666666666661Failed
absent requested label0.33333333333333330.5Failed
empty labels00Passed
empty data0.00Passed
all missed0.00Passed

SHA-256 / b7acf85d2f849dcfb206243ee2a04c3841d381be832641f751b2d237ba9ee7a0

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.887515+00:00.

Case digest / 03d4143ffc9590389af19339540ae92711308991309b9ecbdc35b44703d317f4