You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add PhysioNet 2019 Sepsis Dataset and Prediction Task #1789
This issue proposes adding the PhysioNet/Computing in Cardiology Challenge 2019 ICU sepsis dataset (PhysioNet2019Dataset) and a corresponding sepsis prediction task (PhysioNet2019Sepsis) to PyHealth.
Open-access ICU sepsis data (CC BY 4.0): 40,336 ICU stays across two hospitals (Hospital A: 20,336; Hospital B: 20,000; 1,552,210 patient-hours; 7.3% septic stays), usable without MIMIC credentialing.
Hourly wide-table pattern & two-layer NaN design: Each .psv stay is a sparse hourly wide table (labs average 94.8% hourly missing, with strong informative missingness / MNAR). Keeping raw NaN lossless in the Dataset layer while making missingness handling configurable in the Task layer preserves clinical signal across model families.
Proposed Plan (Split into 2 Focused PRs)
PR 1 (Dataset layer): Add PhysioNet2019Dataset, 3-table YAML config (events, labels, patients), manifest-based download_physionet2019, standalone wide-to-long parser parse_wide_hourly_record, streaming prepare_physionet2019, synthetic-data unit tests, and Sphinx API docs.
PR 2 (Task & example): Add PhysioNet2019Sepsis (supporting configurable NaN handling, optional clinical cleaning, split_by_hospital, and toggleable P19 <60h filtering with a length-only lower-bound baseline), synthetic tests, docs, and a JointSeqImage benchmark example.
Status
PR 1 is implemented and tested locally (synthetic unit tests, tools/check_pr_rules.py, and full 40,336-stay smoke verification) and is being opened now.
Thanks for the proposal. This is already covered by the open PR #1790 (PhysioNet2019Dataset), which is now labeled for AI review. Please follow the PR for review feedback; a sepsis prediction task can be a follow-up PR.
Update: PhysioNet2019Dataset was merged in #1790 (commit 3459aef). A sepsis prediction task on top of it is still open for a follow-up PR; please check master for an existing task before starting.
For the hourly prediction task, could we add a synthetic cutoff test? Pick one prediction hour and make two copies of the same stay. Keep their measurements through that hour and their target label identical, then change a measurement after the cutoff in just one copy. The feature inputs for that prediction should be identical. A measurement at the boundary can also make the intended rule for including the prediction hour explicit. This would catch future measurements leaking through feature extraction or imputation.
I have opened the follow-up PR #1823 implementing PhysioNet2019Sepsis (stay-level pre-onset early sepsis prediction aligned with Raindrop / ViTST / JointSeqImage), physionet2019_sepsis_statistics, split_by_hospital, TaskCard metadata, and a JointSeqImage benchmark example.
Following @anaba5is's suggestion, PR #1823 includes test_synthetic_cutoff_prevents_future_leakage in tests/core/test_physionet2019_sepsis.py: it constructs twin copies of the same ICU stay identical through the pre-onset boundary hour (first_sepsis_hour - 1) with mutated post-cutoff measurements in one copy, verifying bit-for-bit identical feature inputs (x, x_time, x_mask, x_delta) and normalization statistics across both raw and vital_ffill modes, while explicitly asserting inclusion of the boundary hour and exclusion of first_sepsis_hour and later hours.
Activity
solarsys commentedon Dec 2, 2026
Thanks for the proposal. This is already covered by the open PR #1790 (PhysioNet2019Dataset), which is now labeled for AI review. Please follow the PR for review feedback; a sepsis prediction task can be a follow-up PR.
Generated by Claude Code
solarsys commentedon Dec 4, 2026
Update:
PhysioNet2019Datasetwas merged in #1790 (commit 3459aef). A sepsis prediction task on top of it is still open for a follow-up PR; please check master for an existing task before starting.Generated by Claude Code
anaba5is commentedon Dec 5, 2026
For the hourly prediction task, could we add a synthetic cutoff test? Pick one prediction hour and make two copies of the same stay. Keep their measurements through that hour and their target label identical, then change a measurement after the cutoff in just one copy. The feature inputs for that prediction should be identical. A measurement at the boundary can also make the intended rule for including the prediction hour explicit. This would catch future measurements leaking through feature extraction or imputation.
yuema-git commentedon Dec 6, 2026
Thanks @solarsys for the update and @anaba5is for the great suggestion!
I have opened the follow-up PR #1823 implementing
PhysioNet2019Sepsis(stay-level pre-onset early sepsis prediction aligned with Raindrop / ViTST /JointSeqImage),physionet2019_sepsis_statistics,split_by_hospital,TaskCardmetadata, and aJointSeqImagebenchmark example.Following @anaba5is's suggestion, PR #1823 includes
test_synthetic_cutoff_prevents_future_leakageintests/core/test_physionet2019_sepsis.py: it constructs twin copies of the same ICU stay identical through the pre-onset boundary hour (first_sepsis_hour - 1) with mutated post-cutoff measurements in one copy, verifying bit-for-bit identical feature inputs (x,x_time,x_mask,x_delta) and normalization statistics across bothrawandvital_ffillmodes, while explicitly asserting inclusion of the boundary hour and exclusion offirst_sepsis_hourand later hours.