FA-100381 / Feature preprocessing fit scope / Open access
Variance selector learns feature support from held-out rows · case 01
The fitted feature projection changes the dimensionality of transformed numeric rows.
ROOT CAUSE
Variance is computed from training and transform rows together.
THE FAILURE
Variance is computed from training and transform rows together.
Unsuccessful approach: Using sample variance still selects a borderline feature even after held-out rows are removed.
Case contract
Train and rows are nonempty rectangular numeric matrices with equal width; threshold is nonnegative. Fit population variance per training column and retain columns with variance strictly greater than threshold, preserving original order.
Why this case matters
A fitted column projection demonstrates how training-only statistics control later feature transforms.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(train, rows, threshold):
v=train+rows; cols=[j for j in range(len(train[0])) if sum((r[j]-sum(x[j] for x in v)/len(v))**2 for r in v)/len(v)>threshold]; return [[r[j] for j in cols] for r in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('heldout variance ignored',solve([[0,0],[0,2]],[[2,2]],0.5),[[2]])
check('ordinary varying column',solve([[1,0],[1,2],[1,4]],[[8,3]],0.5),[[3]])
check('sample variance attempt boundary',solve([[0,0],[0,2],[0,2]],[[0,1]],1.2),[[]])
check('constant training features',solve([[N,N],[N,N]],[[N+3,N-2]],0),[[]])
check('empty transform',solve([[0,0],[0,2]],[],0),[])
check('single selected feature',solve([[0],[2]],[[N]],0.5),[[N]])
check('two selected columns retain order',solve([[0,0],[2,4]],[[1,3]],0.5),[[1,3]])
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 |
|---|---|---|---|
| heldout variance ignored | [[2, 2]] | [[2]] | Failed |
| ordinary varying column | [[8, 3]] | [[3]] | Failed |
| sample variance attempt boundary | [[]] | [[]] | Passed |
| constant training features | [[4, -1]] | [[]] | Failed |
| empty transform | [] | [] | Passed |
| single selected feature | [[1]] | [[1]] | Passed |
| two selected columns retain order | [[1, 3]] | [[1, 3]] | Passed |
SHA-256 / bb9ea71c5769d0a7552a8a3dbbc2761d567dd27474d9e887e2f3c42c670dc2a9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(train, rows, threshold):
cols=[j for j in range(len(train[0])) if sum((r[j]-sum(x[j] for x in train)/len(train))**2 for r in train)/max(1,len(train)-1)>threshold]; return [[r[j] for j in cols] for r in rows]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('heldout variance ignored',solve([[0,0],[0,2]],[[2,2]],0.5),[[2]])
check('ordinary varying column',solve([[1,0],[1,2],[1,4]],[[8,3]],0.5),[[3]])
check('sample variance attempt boundary',solve([[0,0],[0,2],[0,2]],[[0,1]],1.2),[[]])
check('constant training features',solve([[N,N],[N,N]],[[N+3,N-2]],0),[[]])
check('empty transform',solve([[0,0],[0,2]],[],0),[])
check('single selected feature',solve([[0],[2]],[[N]],0.5),[[N]])
check('two selected columns retain order',solve([[0,0],[2,4]],[[1,3]],0.5),[[1,3]])
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 |
|---|---|---|---|
| heldout variance ignored | [[2]] | [[2]] | Passed |
| ordinary varying column | [[3]] | [[3]] | Passed |
| sample variance attempt boundary | [[1]] | [[]] | Failed |
| constant training features | [[]] | [[]] | Passed |
| empty transform | [] | [] | Passed |
| single selected feature | [[1]] | [[1]] | Passed |
| two selected columns retain order | [[1, 3]] | [[1, 3]] | Passed |
SHA-256 / 0791e9d21f40f6d1845aef0b648902c196f2ee06cd53b6dcb7096dc67c4ea4ae
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
This toy selector uses population variance for numeric columns and does not claim compatibility with a production estimator. 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.921056+00:00.
Case digest / a730e3bf2f4a677d390cb1ce62358c8f299fcc9f17c50034205f8e26d7ce045b