Drop range upper-bound LVEF readings from the label chain - #85
Open
duckyquang wants to merge 1 commit into
Open
Conversation
lvef_upper and rest_lvef_upper are the high end of a reported range, not a point EF. On the canonical run 18 of the 24 cohort rows lvef_upper labelled carried LVEF = 100.0 and the 6 such test rows scored 43.1 MAE against the fused checkpoint vs 10.41 overall - parse artifacts, not measurements. A midpoint conversion is no better with the upper end pinned at 100, so the chain drops them (#75); rest_lvef_upper shares the bound semantics and never occurs in this cohort. The exclusion is visible, not silent. One lvef_candidates CTE now does the parse / range-gate / dedupe once over chain names plus the excluded bounds, with an accepted flag marking chain membership: the cohort path filters WHERE accepted, the funnel gains an explicit label-selection step whose diff is the exclusion's cost, and the LVEF source breakdown reports the dropped studies with excluded=TRUE (their pct and is_fallback stay null so the labelled shares still sum to 100). The rule also rides in the cohort summary's drop_rules. Rebuilding the manifest and retraining stay open on #75 - this machine has no BigQuery access or embedding cache.
duckyquang
requested review from
gullyboyslok,
kevzho,
noahdanehebdon,
paiksca,
sebasmos and
tigerkrittaphas
August 31, 2026 19:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #75.
lvef_upper/rest_lvef_upperare the high end of a reported range, not a point EF — on the canonical run 18 of the 24 cohort rowslvef_upperlabelled carry LVEF = 100.0, and its 6 test rows sit at 43.1 MAE against the fused checkpoint vs 10.41 overall (docs/results/baseline_gap.json,fused_mae_by_lvef_source). Those are range-parse artifacts feeding the regression label, so the chain now excludes them. I went with exclude over midpoint: with the upper end pinned at 100 a midpoint is still a bound artifact, not a measurement.The exclusion is visible, not silent:
lvef_candidatesCTE does the parse / range-gate / dedupe once over the chain names plus the excluded bounds, with anacceptedflag marking chain membership — the cohort path just filtersWHERE acceptedcohort_funnel.*and the CONSORT flowchart instead of being lumped into "no LVEF"excluded=TRUE(theirpct/is_fallbackstay null so the labelled shares still sum to 100)drop_rulesResult
Nothing rebuilt — this machine has no BigQuery access or embedding cache, so there are no new cohort numbers here. 117 tests pass locally (
pytest),ruff checkandruff format --checkclean. From E10's measured numbers the rebuild should lose ~24 of the 1,208 manifest rows and move test MAE from ~10.4 toward ~9.6, but that's a prediction from the diagnosis, not a run.Notes
feat/eval-artifacts), so the diff here is just the one commit; retarget tomainonce Real fairness, calibration, and baseline-gap artifacts from the canonical run #74 merges. Merge order: Real fairness, calibration, and baseline-gap artifacts from the canonical run #74 → this.build_cohort.py→build_echo_hubert_manifest.py→train_probes.py→ the evals once this lands? The funnel and breakdown will print the exclusion counts, and the docs restate happens from those artifacts the same way we just did it on Real fairness, calibration, and baseline-gap artifacts from the canonical run #74.