Skip to content

Sleep stage automatic classifier using CNNs and LSTMs to process frequency signals of brain activity recorded via ElectroEncephaloGram EEG. Undergraduate thesis

Notifications You must be signed in to change notification settings

carlosfg97/AutomaticSleepStageClassifier

Repository files navigation

Automatic Sleep Classification

Introduction

This repository holds the code for training and testing a sleep classification model in Python. The techniques used are CNNs and LSTMs and the input data is the EEG channel of the dataset available here.

The whole pipeline of the project, from data extraction, to modeling, to output analysis is available and adequatelly documented in the 3 notebooks, which are to be executed in the following order: 1. Data Acquisition --> 2. Classifiers --> 3. Threshold analysis.

How to run

  • The 3 notebooks are implemented in Google Colab. To run, just download the complete repository and upload it into a Google Drive folder. Inside the notebooks, you will find the code to link the Colab session to the Google Drive File System when required.

  • The notebooks were written for a smooth Google Colab execution; however, it should be relatively simple to adapt them to any other Python notebook product (Anaconda, Kaggle, etc).

  • Libraries: In the Colab environment most libraries are preinstalled. Only 1 library (MNE) is installed inline when required using pip.

Methods

  • The notebook experiments with 2 versions of CNN and LSTM ensembles. The architecture of the best performing network is as follows:

a. CNN

cnn

b. LSTM

lstm

Bugs and future work:

  • None found.

  • Any feedback will be well taken and appreciated!

About

Sleep stage automatic classifier using CNNs and LSTMs to process frequency signals of brain activity recorded via ElectroEncephaloGram EEG. Undergraduate thesis

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published