Coder Social home page Coder Social logo

xiao-lin-li / seizure-detection-tutorials Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eldave93/seizure-detection-tutorials

0.0 0.0 0.0 13.36 MB

A series of tutorials teaching the use of Python for epileptic seizure detection on open-source datasets

License: Creative Commons Attribution Share Alike 4.0 International

Jupyter Notebook 100.00%

seizure-detection-tutorials's Introduction

Seizure Detection Tutorials

This is a series of notebooks I developed alongside my PhD Thesis to demonstrate the application of signal processing and machine learning classification to epileptic seizure detection.

Currently four open-source datasets are used:

  1. The Epileptologie Database18

  2. UPenn and Mayo Clinic's Seizure Detection Challenge21

  3. CHB-MIT Scalp EEG Database19

  4. NEDC TUH EEG Seizure corpus26

Other databases exist but have their limitations:

  • The European Epilepsy Database (epilepsy-database.eu)

    • Big, Well documented
    • โ‚ฌ3000/6000 3 year licence
  • IEEG (https://www.ieeg.org/)

    • Open-source
    • Hard to navigate
  • LONDI (https://ida.loni.usc.edu)

    • Has updated projects
    • Permission for access

Topics covered

  • Biosignal Feature Extraction
  • Feature Pre-Processing
  • Supervised Classification
  • Model Evaluation
  • Hyperparameter Tuning (Gridsearch, Random Search, Bayesian Optimization)
  • Ensemble Learning
  • Dimensionality Reduction
  • Batch Learning
  • Multilayer Perceptrons
  • Convolutional Neural Networks
  • Recurrent Neural Networks

I'd like to give a massive thank you to the open source community for all the hard work that is put into the Python language, interactive computing resourses, and packages used to make this project a reality. Also thank you to Hvass Laboratories (http://www.hvass-labs.org/) whos Tutorials on TensorFlow were the inspiration for creating my own tutorials.

Progress Update

  • 18/06/2021: My PhD is now publicly available: Thesis, Supplementary Information. If you found these tutorials useful you may also get something out of the methods review and research papers in there. Additionally, you may enjoy some of the lecture materials I've created for a masters course "Machine Learning in Python" at Edinburgh University. More data science and machine learning materials are being developed for this course and other courses I'll be running next year. Maybe in the future I'll have chance to come back and work on these some more, but currently this side project is on hold.

Getting Started

Due to the size of these notebooks you may need to use nbviewer to view the notebooks. To do this all you need to do is copy the url for the notebook (e.g. https://github.com/Eldave93/Seizure-Detection-Tutorials/blob/master/01.%20Overview%20of%20Datasets.ipynb) into the URL bar on the nbviewer website.

Prerequisites

The easiest way of interacting with these notebooks is to use Google Colaboratory.

"Colaboratory allows you to use and share Jupyter notebooks with others without having to download, install, or run anything on your own computer other than a browser" (https://research.google.com/colaboratory/faq.html).

I recommend Google Colaboratory mostly because of the size of the RAM available and the access to GPU's via the cloud. When working on the later notebooks, which use the TensorFlow package, the notebook will be ran a tonne faster! You can open the notebook in Colaboratory by clicking on the "Open in Colab" button at the top of the notebook.

Another option is to use Binder. Binder is a open-source cloud deployment for Jupyter notebooks (see https://mybinder.readthedocs.io/en/latest/ for details). Although completely free it does have relatively limited computational resources, with a maximum of 2GB of RAM. This means some of the later notebooks which use larger datasets will likely not fit into memory.

If you want to interact with the notebooks locally on your machine then I advise you download Anaconda with Python 3 (See http://docs.anaconda.com/anaconda/install/) to get you started. Anaconda makes it easy to create a virtual environment in which to install and manage Python packages. It also provides an easy interface in which to launch the Jupyter Notebook interface (the Anaconda Navigator).

Installing Packages

The notebooks start with a method to automatically install the required packages and data if using Google Colab. If working on these locally I encourage you to use a virtual environment. All you need to do is create a new environment and launch the Jupyter Notebook application from that environment (See http://docs.anaconda.com/anaconda/navigator/ for more information).

If you want to install the packages manually from command prompt (or Anaconda prompt) then install the following packages below.

  • matplotlib
  • pandas
  • numpy
  • scipy
  • scikit-learn
  • umap-learn
  • imblearn
  • seaborn
  • mlxtend
  • mne
  • PyWavelets
  • Tensorflow

Shield: CC BY-SA 4.0

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

CC BY-SA 4.0

seizure-detection-tutorials's People

Contributors

eldave93 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.