oncodsl / Read docs /PROMPT_target_fix.md
govindbalki's picture
Upload folder using huggingface_hub
0fff343 verified
|
Raw
History Blame Contribute Delete
2.97 kB

Prompt β€” Bind the scoring target to the objective (bug fix) + update objective explainers

A run produced this "TMB winner": Associate(Reduce(Select(M,[…]),median), msi, spearman) β€” it scored against the MSI label under the TMB objective. The engine was able to choose its own target because labels were exposed as operands. Fix that, and update the objective help text that now describes the old (wrong) behaviour. Read the grammar / interpreter / program_repr / objective + tooltip code first; don't assume names. Keep the airgap green and existing presets/Streamlit working.

1. BIND THE TARGET (engine fix)

  • REMOVE the target labels (msi, tmb) as selectable operands/terminals in the grammar. The engine must not reference a label as data anywhere in a program.
  • The program produces a per-patient score (Vector) from genes (+ optional Effect adjustment on confounders). The terminal scoring/fitting step's TARGET is BOUND to the active objective's target, not chosen:
    • MSI objective β†’ AUROC of the score vs msi.
    • TMB objective β†’ signed-negative correlation of the score vs tmb.
    • The engine may still choose: raw (Associate) vs adjusted (Effect, residualize on stage/age), and correlation kind (pearson/spearman). It may NOT choose the target.
    • Same rule for Fit: it trains on the objective's target only, evaluated held-out.
  • Confounders stage/age remain available ONLY as Effect adjustment inputs and as Split predicates β€” never as prediction targets.
  • program_repr shows the bound objective target (e.g. Associate(score, <tmb>, spearman) under the TMB objective), not a free argument.
  • Add a guard/test: assert no program references any label column as a free operand, and that the scoring target always equals the active objective's target. Keep the airgap test green.

2. UPDATE THE OBJECTIVE EXPLAINERS (UI) to match

The shared footer note in the objective "?" modals currently says the target can be written in the DSL "against a Load'ed label" β€” that is now FALSE (the program can't reference the target). Replace that shared footer note (in all four objective modals) with, verbatim:

"What the program chooses is how to build the score and how to compare it β€” a raw association (Associate) or a confounder-adjusted one (Effect), plus the correlation kind. What stays outside the DSL is the compass: the target it's scored against, in which direction, judged honestly on held-out data. The program can't pick the target β€” that would let the answer into the language."

Leave the rest of each modal's content unchanged (the "Represented as", "Why negative", "Correlation β‰  causation", and "Toward causal" sections remain correct).

Checkpoint

Re-run the TMB objective and show me: (a) the winner's program_repr now scores against TMB (not msi); (b) the guard/test passes; (c) the Mutation-burden "?" modal shows the updated footer. Confirm the airgap test is green and existing presets/Streamlit still work.