FAILURE MAP
← Case archive

FA-100386 / Feature preprocessing fit scope / Open access

Variance selector includes a feature at the strict cutoff · case 01

The fitted feature projection changes the dimensionality of transformed numeric rows.

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

ROOT CAUSE

The cutoff comparison includes features whose variance equals the requested threshold.

THE FAILURE

The cutoff comparison includes features whose variance equals the requested threshold.

Unsuccessful approach: Reversing the selected feature indices preserves the width but changes column ownership.

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):
    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)/len(train)>=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('strict cutoff excludes equality',solve([[0,0],[0,2]],[[1,2]],1),[[]])
check('two active columns ordered',solve([[0,0],[2,4]],[[1,3]],0.5),[[1,3]])
check('constant feature removed',solve([[N,0],[N,2]],[[N+2,1]],0.5),[[1]])
check('no active features',solve([[1],[1]],[[8]],0),[[]])
check('empty transform',solve([[0],[2]],[],0.5),[])
check('single feature above cutoff',solve([[0],[4]],[[2]],1),[[2]])
check('empty selection keeps row',solve([[3],[3]],[[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
strict cutoff excludes equality[[2]][[]]Failed
two active columns ordered[[1, 3]][[1, 3]]Passed
constant feature removed[[1]][[1]]Passed
no active features[[8]][[]]Failed
empty transform[][]Passed
single feature above cutoff[[2]][[2]]Passed
empty selection keeps row[[1]][[]]Failed

SHA-256 / fe3ae3179398b93cd43622a81049cc6846e73caf712b2f62f5943a367b875476

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)/len(train)>threshold]; cols=list(reversed(cols)); 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('strict cutoff excludes equality',solve([[0,0],[0,2]],[[1,2]],1),[[]])
check('two active columns ordered',solve([[0,0],[2,4]],[[1,3]],0.5),[[1,3]])
check('constant feature removed',solve([[N,0],[N,2]],[[N+2,1]],0.5),[[1]])
check('no active features',solve([[1],[1]],[[8]],0),[[]])
check('empty transform',solve([[0],[2]],[],0.5),[])
check('single feature above cutoff',solve([[0],[4]],[[2]],1),[[2]])
check('empty selection keeps row',solve([[3],[3]],[[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
strict cutoff excludes equality[[]][[]]Passed
two active columns ordered[[3, 1]][[1, 3]]Failed
constant feature removed[[1]][[1]]Passed
no active features[[]][[]]Passed
empty transform[][]Passed
single feature above cutoff[[2]][[2]]Passed
empty selection keeps row[[]][[]]Passed

SHA-256 / 4cf9c12e2d6732c5df24e294a3e83759997b02bff41aa06b25829e39fc5117ba

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

Case digest / f00821f5367984d29c5607b40395686a4f5cf6867f67eb40b048519e04e319de