PyHealth
PyHealth copied to clipboard
[CS598 DLH] Add DREAMT OSA classification
Title
Add DREAMT dataset + OSA classification task
Summary
This PR adds support for the DREAMT sleep dataset and a simple patient-level OSA classification task based on DREAMT clinical metadata.
Changes
-
DREAMTDataset
- Wraps PhysioNet DREAMT (1.0.0–2.1.0) as a
BaseDataset. - Builds
dreamt-metadata.csvfromparticipant_info.csv. - Normalizes columns (e.g.,
SID → patient_id,AHI → ahi, etc.) and attaches paths to 64Hz/100Hz CSVs.
- Wraps PhysioNet DREAMT (1.0.0–2.1.0) as a
-
DREAMTOSAClassification
- New
BaseTaskfor patient-level OSA prediction. - Tasks:
-
ahi_severity_4class(normal / mild / moderate / severe). -
ahi_binary_15(AHI < 15 vs ≥ 15). -
oahi_binary_5(OAHI < 5 vs ≥ 5).
-
- Uses tabular clinical features (age, gender, BMI, SaO₂, arousal index, history, disorders).
- New
-
Tests
-
tests/core/test_dreamt_osa_task.py:- Checks label mapping and feature dict for
ahi_severity_4class. - Verifies split handling and binary label for
ahi_binary_15.
- Checks label mapping and feature dict for
-