Add DREAMTSleepClassification standalone task with ablation study#1026
Draft
suraj2498 wants to merge 2 commits intosunlabuiuc:masterfrom
Draft
Add DREAMTSleepClassification standalone task with ablation study#1026suraj2498 wants to merge 2 commits intosunlabuiuc:masterfrom
suraj2498 wants to merge 2 commits intosunlabuiuc:masterfrom
Conversation
Implements IBI-based sleep staging task for the DREAMT wearable dataset
following the WatchSleepNet preprocessing pipeline (Wang et al., 2025).
Includes 3-class/4-class label configs, optional accelerometer input,
configurable epoch duration, 42 unit tests, and example ablation script.
feat: switch payment submission email
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.
Standalone Task: DREAMTSleepClassification
Contributors: Suraj Kumar, Rahul Grover
Course: CS598 Deep Learning for Healthcare, UIUC
Type of Contribution
Standalone Task for existing PyHealth dataset (DREAMTDataset)
Related Paper
Wang et al., WatchSleepNet: A Novel Model and Pretraining Approach for Advancing Sleep Staging with Smartwatches, 2025.
https://proceedings.mlr.press/v287/wang25a.html
High-Level Description
This PR implements DREAMTSleepClassification, an IBI-based sleep staging task for the DREAMT wearable dataset that reproduces the preprocessing pipeline from WatchSleepNet (Wang et al., 2025).
The task segments each patient's full-night 64 Hz wrist-worn PPG recording into non-overlapping 30-second epochs, extracts non-zero Inter-Beat Interval (IBI) values per window, and assigns a majority-vote sleep stage label. Two label configurations are supported:
An optional accelerometer augmentation (use_accelerometer=True) appends raw ACC_X/Y/Z signals to each sample for wake-detection ablation studies.
Three novel ablation studies not present in the original paper are demonstrated in the example script:
Validated end-to-end on 7 patients from DREAMT v2.1.0 using PyHealth's built-in RNN model (test accuracy: 72.5%).
Files to Review
pyhealth/tasks/dreamt_sleep_classification.py— core task implementationdocs/api/tasks/pyhealth.tasks.DREAMTSleepClassification.rst— API documentationdocs/api/tasks.rst— updated table of contentsexamples/dreamt_sleep_classification.py— ablation study script (runnable with--demo)examples/dreamt_sleep_classification.ipynb— Jupyter notebook versiontests/core/test_dreamt.py— task + dataset tests (42 tests, synthetic data only)pyhealth/tasks/__init__.py— export addedRunning the Example
No data download required
python examples/dreamt_sleep_classification.py --demo
With real DREAMT data
python examples/dreamt_sleep_classification.py --root /path/to/dreamt/2.1.0
Running the Tests
python -m unittest tests/core/test_dreamt.py -v
42 tests, ~1.2 seconds, all synthetic data