Add SleepWakeClassification task for DREAMT#892
Open
diegofariasc wants to merge 28 commits intosunlabuiuc:masterfrom
Open
Add SleepWakeClassification task for DREAMT#892diegofariasc wants to merge 28 commits intosunlabuiuc:masterfrom
diegofariasc wants to merge 28 commits intosunlabuiuc:masterfrom
Conversation
…sic wearable features
…ke_classification_lightgbm.py
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.
Contributor: Diego Farias Castro (diegof4@illinois.edu)
Type of contribution: task
Link to original paper: https://proceedings.mlr.press/v248/wang24a.html
High-level description:
This PR adds a new standalone task,
SleepWakeClassification, on top of the existingDREAMTDataset. The task supports epoch-level sleep-vs-wake prediction from multimodal wrist-worn wearable signals. It turns each DREAMT record into fixed-length epochs, extracts features from accelerometer, temperature, blood volume pulse, and electrodermal activity signals, adds temporal context features, and assigns a binary sleep/wake label to each epoch.Implementation summary:
SleepWakeClassificationinpyhealth/tasks/sleep_wake_classification.pypyhealth/tasks/__init__.pydocs/api/tasks/pyhealth.tasks.sleep_wake_classification.rstdocs/api/tasks.rstexamples/dreamt_sleep_wake_classification_lightgbm.pytests/core/test_sleep_wake_classification.pyReproducibility scope:
This PR focuses on the task side of the paper. It makes the sleep-wake prediction setting available inside PyHealth so the generated samples can be used in new experiments and ablation studies.
Task behavior:
DREAMTDatasetpatient_id,record_id,epoch_index,features, and binarylabel1; sleep stages (REM,N1,N2,N3) map to0features, and EDA-based SCR features
variance for each base feature
File guide:
pyhealth/tasks/sleep_wake_classification.py: task implementationpyhealth/tasks/__init__.py: public task exportdocs/api/tasks/pyhealth.tasks.sleep_wake_classification.rst: task docsdocs/api/tasks.rst: task index updateexamples/dreamt_sleep_wake_classification_lightgbm.py: example and ablation workflowtests/core/test_sleep_wake_classification.py: task unit tests