FAILURE MAP
← Case archive

FA-100366 / Feature preprocessing fit scope / Open access

Population standardization applies fitted state incorrectly · case 01

Population standardization applies fitted state incorrectly.

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

ROOT CAUSE

The transform applies a plausible but incorrect state convention.

THE FAILURE

The transform applies a plausible but incorrect state convention.

Unsuccessful approach: The partial repair addresses the main convention but mishandles an edge case.

Case contract

Fit population mean and population standard deviation on nonempty train; transform values as z scores rounded to six decimals. A zero fitted deviation maps values to zero.

Why this case matters

A small deterministic preprocessing contract makes the fit boundary and transform behavior directly inspectable.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(train, values):
    m=sum(train)/len(train); s=(sum((x-m)**2 for x in train)/max(1,len(train)-1))**0.5; return [round((x-m)/s,6) if s else 0 for x in values]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a=[N,N+2]; check('population scale',solve([0,2],[1,3]),[0,2])
check('heldout does not change center',solve([0,2],[2]),[1])
check('center at mean',solve(a,[N+1]),[0])
check('constant training',solve([N,N],[N+3]),[0])
check('singleton training',solve([N],[N]),[0])
check('empty transform',solve([0,2],[]),[])
check('asymmetric',solve([0,4],[2]),[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
population scale[0.0, 1.414214][0, 2]Failed
heldout does not change center[0.707107][1]Failed
center at mean[0.0][0]Passed
constant training[0][0]Passed
singleton training[0][0]Passed
empty transform[][]Passed
asymmetric[0.0][0]Passed

SHA-256 / 54c3e918c89723700a9937f744bcb521df48b9868894ce67f7047cecae3d30a5

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(train, values):
    m=sum(train)/len(train); s=(sum((x-m)**2 for x in train)/(len(train)+1))**0.5; return [round((x-m)/s,6) if s else 0 for x in values]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a=[N,N+2]; check('population scale',solve([0,2],[1,3]),[0,2])
check('heldout does not change center',solve([0,2],[2]),[1])
check('center at mean',solve(a,[N+1]),[0])
check('constant training',solve([N,N],[N+3]),[0])
check('singleton training',solve([N],[N]),[0])
check('empty transform',solve([0,2],[]),[])
check('asymmetric',solve([0,4],[2]),[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
population scale[0.0, 2.44949][0, 2]Failed
heldout does not change center[1.224745][1]Failed
center at mean[0.0][0]Passed
constant training[0][0]Passed
singleton training[0][0]Passed
empty transform[][]Passed
asymmetric[0.0][0]Passed

SHA-256 / a91cf02302dece3284a05b953698385ec5213d8898c7b5ae18196c814788b3ec

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

Toy scalar standardizer; it uses population variance and defines constant-feature output as zero. 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:34.921335+00:00.

Case digest / f634c74aa2c49f3fe6848d1116b116079790c61cb658508fa5830a644104496f