Code from the paper Do Not Sleep on Linear Models: Simple and Interpretable Techniques Outperform Deep Learning for Sleep Scoring.
Preprint: https://arxiv.org/abs/2207.07753
For each dataset you can find a separate notebook in the notebooks
folder.
The notebooks allow to reproduce the results as they contain;
- data loading (see code in
src
folder) - pre-processing & feature extraction
- (seeded) machine learning experiments
notebook | dataset |
---|---|
SleepEDF-SC +- 30min.ipynb | SC-EDF-20 & SC-EDF-78 |
SleepEDF-ST | SC-EDF-ST |
MASS-SS3 | MASS SS3 |
This repository uses poetry as dependency manager.
A specification of the dependencies is provided in the pyproject.toml
and poetry.lock
files.
You can install the dependencies in your Python environment by executing the following steps;
- Install poetry: https://python-poetry.org/docs/#installation
- Install the dependencies by calling
poetry install
This work uses 4 (sub)sets of data;
SC-EDF-20
: first 20 patients (40 recordings) of Sleep-EDFx - Sleep CassetteSC-EDF-78
: : all 78 patients (153 recordings) of Sleep-EDFx - Sleep CassetteST-EDF
: all 22 patients (44 recordings) of Sleep-EDFx - Sleep TelemetryMASS SS3
: all 62 patients (62 recordings) of the MASS - SS3 subset
Contains the the SC-EDF-20
, SC-EDF-78
, and ST-EDF
subset.
You can download & extract the data via the following commands;
mkdir data
# Download the data
wget https://physionet.org/static/published-projects/sleep-edfx/sleep-edf-database-expanded-1.0.0.zip -P data
# Extract all data
unzip data/sleep-edf-database-expanded-1.0.0.zip -d data
Contains the MASS SS3
subset.
In order to access the data you should submit a request as is described here; http://ceams-carsm.ca/mass/