Skip to content

Drop range upper-bound LVEF readings from the label chain - #85

Open
duckyquang wants to merge 1 commit into
feat/eval-artifactsfrom
fix/lvef-upper-exclusion
Open

Drop range upper-bound LVEF readings from the label chain#85
duckyquang wants to merge 1 commit into
feat/eval-artifactsfrom
fix/lvef-upper-exclusion

Conversation

@duckyquang

Copy link
Copy Markdown
Member

Summary

Closes #75. lvef_upper / 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 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:

  • one lvef_candidates CTE does the parse / range-gate / dedupe once over the chain names plus the excluded bounds, with an accepted flag marking chain membership — the cohort path just filters WHERE accepted
  • the funnel gains an explicit label-selection stage, so its diff is exactly what the exclusion costs and it shows up in cohort_funnel.* and the CONSORT flowchart instead of being lumped into "no LVEF"
  • the LVEF source breakdown reports the dropped studies with excluded=TRUE (their pct / is_fallback stay null so the labelled shares still sum to 100)
  • the rule rides in the cohort summary's drop_rules

Result

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 check and ruff format --check clean. 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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant