This is a Machine Learning passion project I am doing to apply what I am learning in my summer course - APS360: Applied Fundamentals of Deep Learning. I am highly curious about the application of ML in neuroscience, and stumbled upon an interesting topic: sleep staging.
This project is a deep learning model that can automatically classify sleep stages from full night electroencephalogram (EEG), electrooculogram (EOG), and electromyogram (EMG) data. Traditionally, sleep stage scoring is performed manually by trained experts, which is both time-consuming and subjective. Automating this process has the potential to improve sleep disorder diagnosis, enable smarter wearable technology, and make sleep analysis more accessible. Users can choose between different patients and visualize how their sleep progressed throughout the night based on EEG data. This also gives a clear picture of transitions between sleep stages like REM, light, and deep sleep.
A video demo of the project. This video is a placeholder for now lol.
A video demo of the project. This video is a placeholder for now lol.
The dataset I am using for this project is the Sleep-EDF Expanded Dataset. It contains full-night sleep recordings of 153 Caucasian subjects aged 25-101, containing EEG, EOG, EMG and other data. Each patient is represented with a pair of files: polysomnography (PSG) file and a corresponding hypnogram file. The PSG file contains raw EEG data of the patients, and the Hypnogram file contains sleep stage labelling for 30s intervals on the EEG data. The labels are → W: wake, N1: lightest stage of sleep, N2: body starts to relax more deeply, N3 & N4: deeper and more restorative sleep (physically), R: rapid eye movement stage - restorative mentally.
Understanding the sleep stages will allow us to better understand the data, and possibly why the model performs better or worse on certain classes. The video below effectively describes the EEG signals for the various sleep stages.