FA-100351 / Feature preprocessing fit scope / Open access
Min-max scaling uses held-out rows while fitting · case 01
Min-max scaling uses held-out rows while fitting.
ROOT CAUSE
Fitting reads values outside the designated training rows.
THE FAILURE
Fitting reads values outside the designated training rows.
Unsuccessful approach: Filtering rows after computing the statistic still leaves held-out influence.
Case contract
Train and values are nonempty numeric lists. Fit min and max on train, map values linearly to that interval, and map all values to zero when the training range is zero. Round to six decimals.
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):
if not values: return []
lo=min(values); hi=max(values); return [round((x-lo)/(hi-lo),6) if hi!=lo else 0 for x in values]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
t=[N,N+4]; v=[N-2,N+2,N+6]; check('inside',solve(t,v),[-0.5,0.5,1.5])
check('eval extremes do not fit',solve([0,4],[-4,8]),[-1,2])
check('training minimum',solve([N,N+2],[N]),[0])
check('constant train',solve([N,N],[N,N+3]),[0,0])
check('singleton',solve([N],[N]),[0])
check('negative interval',solve([-4,-2],[-3]),[0.5])
check('empty transform',solve([0,1],[]),[])
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 |
|---|---|---|---|
| inside | [0.0, 0.5, 1.0] | [-0.5, 0.5, 1.5] | Failed |
| eval extremes do not fit | [0.0, 1.0] | [-1, 2] | Failed |
| training minimum | [0] | [0] | Passed |
| constant train | [0.0, 1.0] | [0, 0] | Failed |
| singleton | [0] | [0] | Passed |
| negative interval | [0] | [0.5] | Failed |
| empty transform | [] | [] | Passed |
SHA-256 / c556cfbcc60983da876c9383b8bf262868a1aa9c65942029e034562e289e48f1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(train, values):
v=train+values; lo=min(v); hi=max(v); return [round((x-lo)/(hi-lo),6) if hi!=lo else 0 for x in values]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
t=[N,N+4]; v=[N-2,N+2,N+6]; check('inside',solve(t,v),[-0.5,0.5,1.5])
check('eval extremes do not fit',solve([0,4],[-4,8]),[-1,2])
check('training minimum',solve([N,N+2],[N]),[0])
check('constant train',solve([N,N],[N,N+3]),[0,0])
check('singleton',solve([N],[N]),[0])
check('negative interval',solve([-4,-2],[-3]),[0.5])
check('empty transform',solve([0,1],[]),[])
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 |
|---|---|---|---|
| inside | [0.0, 0.5, 1.0] | [-0.5, 0.5, 1.5] | Failed |
| eval extremes do not fit | [0.0, 1.0] | [-1, 2] | Failed |
| training minimum | [0.0] | [0] | Passed |
| constant train | [0.0, 1.0] | [0, 0] | Failed |
| singleton | [0] | [0] | Passed |
| negative interval | [0.5] | [0.5] | Passed |
| empty transform | [] | [] | Passed |
SHA-256 / 092000abca7513a0f65b9dd9e8d06b4384cc795106d3ab9f68b7c1acd5daa9a1
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 min-max transform with a zero-range convention; clipping and production estimator APIs are outside scope. 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.469954+00:00.
Case digest / a35982ca29765e716eae49d57c9eab93009e951d12d0044d67fc1e3b0e95a202