Skip to content

Add MedFuse model + MIMIC-IV EHR/CXR mortality task + runner - #44

Open
joshuxchn wants to merge 1 commit into
mainfrom
jc/medfuse-multimodal
Open

Add MedFuse model + MIMIC-IV EHR/CXR mortality task + runner#44
joshuxchn wants to merge 1 commit into
mainfrom
jc/medfuse-multimodal

Conversation

@joshuxchn

Copy link
Copy Markdown
Collaborator

Original medfuse runs on synthetic sample dataset. This PR connects it to mimic.

Adds

  • medfuse model
  • pyhealth/tasks/medfuse_mortality.pyMedFuseMortalityMIMIC4: one sample per paired ICU stay → {ehr, cxr, cxr_mask, mortality}. --ehr-source vitals (chartevents) | labs (labevents), fixed 48h/2h window.
  • examples/mortality_prediction/medfuse_mimic4.py — script, arguments: --ehr-source {vitals,labs}, --modality {ehr_cxr,ehr_only}, wandb logging, configs embedded .
  • Added task in pyhealth/tasks/__init__.py.

Run: python examples/mortality_prediction/medfuse_mimic4.py --ehr-source vitals --modality ehr_cxr

(Will post run results once they finish)

Ports the MedFuse model (pyhealth/models/medfuse.py) into the fork (it lived only
on upstream) and adds MedFuseMortalityMIMIC4: a real MIMIC-IV + MIMIC-CXR
in-hospital mortality task that emits ehr/cxr/cxr_mask consumed by MedFuse.
EHR selectable between ICU vitals (chartevents) and chemistry labs (labevents);
plus an example runner. Exports added to tasks/ and models/ __init__.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joshuxchn
joshuxchn requested a review from will-pang July 30, 2026 20:46
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