Stroke case-study notebook (reproduces arXiv:2606.12623 on synthetic data) - #11
Open
oduerr wants to merge 1 commit into
Open
Stroke case-study notebook (reproduces arXiv:2606.12623 on synthetic data)#11oduerr wants to merge 1 commit into
oduerr wants to merge 1 commit into
Conversation
…tic data) notebooks/stroke_case_study.py reproduces the stroke ITE paper's pipeline on the public magic-mrclean/nl synthetic cohort (clinical data is private): fit a flexible TRAM-DAG on the confounded observational arm, predict per-patient ITEs on the randomized trial arm, and validate. Reproduces Fig. 5 (ITE distribution, ATE +0.094), Fig. 6 (model-simulated trial outcome shift), Fig. 7 (treated-arm discrimination), Table 3 (ATE consistency: TRAM-DAG +0.094 vs known true +0.104 vs trial +0.094, naive confounded +0.301). Adds the validation the real study explicitly could not: predicted vs true per-patient ITE (rank-corr 0.83), which also exposes the homogeneous-T modeling limitation vs the SCM's true age-heterogeneity. Validated end-to-end headless; figures render. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Adds
notebooks/stroke_case_study.py— reproduces the case-study paper Estimating Individualized Treatment Effects in Acute Ischemic Stroke with TRAM-DAG (arXiv:2606.12623) on the public syntheticmagic-mrcleancohort (the clinical MAGIC/MR CLEAN data is private).Mirrors the paper's pipeline: fit one flexible TRAM-DAG on the confounded observational arm (Age/NIHSSa nonlinear, mRS_pre/T linear, ordinal outcome), then predict per-patient ITEs on the randomized trial arm and validate. Reproduces:
Plus the validation the real study explicitly could not do (the fundamental problem of causal inference): with a known SCM, predicted vs true per-patient ITE — rank-corr 0.83, and the saturation of predicted ITE vs the SCM's true age-heterogeneity cleanly exposes the homogeneous-
Tmodeling choice the paper flags as future work.Self-contained (
pip install tramdag, uses the packaged generator); validated end-to-end headless, all figures render. jupytext.py(the.ipynbstays git-ignored).Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com