{"abstract":"The fitted feature projection changes the dimensionality of transformed numeric rows.","category":"Feature preprocessing fit scope","checks":7,"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.","contract_signature":"train, rows, threshold","evaluation_group":"w3-feature-preprocessing-fit-scope-variance-feature-selection","failed_approach":"Using sample variance still selects a borderline feature even after held-out rows are removed.","family":"w3-feature-preprocessing-fit-scope-variance-feature-selection-fit-leakage","id":"FA-100381","implementations":{"attempt":{"sha256":"0791e9d21f40f6d1845aef0b648902c196f2ee06cd53b6dcb7096dc67c4ea4ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, rows, threshold):\n    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]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('heldout variance ignored',solve([[0,0],[0,2]],[[2,2]],0.5),[[2]])\ncheck('ordinary varying column',solve([[1,0],[1,2],[1,4]],[[8,3]],0.5),[[3]])\ncheck('sample variance attempt boundary',solve([[0,0],[0,2],[0,2]],[[0,1]],1.2),[[]])\ncheck('constant training features',solve([[N,N],[N,N]],[[N+3,N-2]],0),[[]])\ncheck('empty transform',solve([[0,0],[0,2]],[],0),[])\ncheck('single selected feature',solve([[0],[2]],[[N]],0.5),[[N]])\ncheck('two selected columns retain order',solve([[0,0],[2,4]],[[1,3]],0.5),[[1,3]])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"bb9ea71c5769d0a7552a8a3dbbc2761d567dd27474d9e887e2f3c42c670dc2a9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, rows, threshold):\n    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]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('heldout variance ignored',solve([[0,0],[0,2]],[[2,2]],0.5),[[2]])\ncheck('ordinary varying column',solve([[1,0],[1,2],[1,4]],[[8,3]],0.5),[[3]])\ncheck('sample variance attempt boundary',solve([[0,0],[0,2],[0,2]],[[0,1]],1.2),[[]])\ncheck('constant training features',solve([[N,N],[N,N]],[[N+3,N-2]],0),[[]])\ncheck('empty transform',solve([[0,0],[0,2]],[],0),[])\ncheck('single selected feature',solve([[0],[2]],[[N]],0.5),[[N]])\ncheck('two selected columns retain order',solve([[0,0],[2,4]],[[1,3]],0.5),[[1,3]])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-feature-preprocessing-fit-scope-variance-feature-selection-fit-leakage","generated_at":"2026-09-30T16:48:34.921056+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A fitted column projection demonstrates how training-only statistics control later feature transforms.","root_cause":"Variance is computed from training and transform rows together.","sha256":"a730e3bf2f4a677d390cb1ce62358c8f299fcc9f17c50034205f8e26d7ce045b","title":"Variance selector learns feature support from held-out rows · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":27.422,"exit_code":1,"observations":[{"actual":[[2]],"check":"heldout variance ignored","expected":[[2]],"passed":true},{"actual":[[3]],"check":"ordinary varying column","expected":[[3]],"passed":true},{"actual":[[1]],"check":"sample variance attempt boundary","expected":[[]],"passed":false},{"actual":[[]],"check":"constant training features","expected":[[]],"passed":true},{"actual":[],"check":"empty transform","expected":[],"passed":true},{"actual":[[1]],"check":"single selected feature","expected":[[1]],"passed":true},{"actual":[[1,3]],"check":"two selected columns retain order","expected":[[1,3]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"heldout variance ignored\", \"actual\": [[2]], \"expected\": [[2]], \"passed\": true}, {\"check\": \"ordinary varying column\", \"actual\": [[3]], \"expected\": [[3]], \"passed\": true}, {\"check\": \"sample variance attempt boundary\", \"actual\": [[1]], \"expected\": [[]], \"passed\": false}, {\"check\": \"constant training features\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single selected feature\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"two selected columns retain order\", \"actual\": [[1, 3]], \"expected\": [[1, 3]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.553,"exit_code":1,"observations":[{"actual":[[2,2]],"check":"heldout variance ignored","expected":[[2]],"passed":false},{"actual":[[8,3]],"check":"ordinary varying column","expected":[[3]],"passed":false},{"actual":[[]],"check":"sample variance attempt boundary","expected":[[]],"passed":true},{"actual":[[4,-1]],"check":"constant training features","expected":[[]],"passed":false},{"actual":[],"check":"empty transform","expected":[],"passed":true},{"actual":[[1]],"check":"single selected feature","expected":[[1]],"passed":true},{"actual":[[1,3]],"check":"two selected columns retain order","expected":[[1,3]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"heldout variance ignored\", \"actual\": [[2, 2]], \"expected\": [[2]], \"passed\": false}, {\"check\": \"ordinary varying column\", \"actual\": [[8, 3]], \"expected\": [[3]], \"passed\": false}, {\"check\": \"sample variance attempt boundary\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"constant training features\", \"actual\": [[4, -1]], \"expected\": [[]], \"passed\": false}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single selected feature\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"two selected columns retain order\", \"actual\": [[1, 3]], \"expected\": [[1, 3]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}