GithubHelp home page GithubHelp logo

qianli-wu / eeg_classification Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 62 KB

The final project for ECE C147/C247, which evaluates the performance of CNN + Transformer and CNN + GRU + SimpleRNN models on an EEG dataset.

Python 100.00%
cnn-architecture keras rnn-gru transformer

eeg_classification's Introduction

EEG_classification

This repository contains the final project for ECE C147/C247, which evaluates the performance of CNN + Transformer and CNN + GRU + SimpleRNN models on an EEG dataset. The objective is to classify subjects' movements using 22 channels of EEG electrode data. The repo focuses on providing the model architectures used in the project. Please note that the dataset and the project write-up are not included in this repository.

Requirements

Tensorflow gpu acceleration does not support CUDA toolkit 11.2 or above

CUDA version <= 11.2

It is recommended to create a virtual environment for this project by conda

conda create -n egg_classification python=3.9

Then activate the environment by

conda activate egg_classification

Then use pip to install all packages:

pip3 install -r requirements.txt

Running

Here's an example:

$ python main.py --model=cnn+transformer --epoch=200 --learning_rate=4e-4 --num_heads=2 --ensemble=1
  • model: model can be selected from cnn, cnn+transformer, cnn+rnn, and transformer.
  • epoch: Integer. Number of epochs to train the model.
  • learning_rate: Floating point value.
  • num_heads: Interger. Number of heads in transformer Multi-Head Attention Layer.
  • ensemble: Integer. Number of models in model ensembling
  • patience: Integer. Number of epochs that produced the monitored quantity with no improvement after which training will be stopped

Transformers

  • transformer needs larger dataset and more complex model to achieve similar performance with CNNs and RNNs since it makes less assumption on our model.
    • The cost is its ability to extract information from data
  • transformer requires similar complexity per layer but less Sequential Operations than RNNs and smaller Max Path Length than RNNs and CNNs

Reference

Keras

BCI Competition 2008 โ€“ Graz data set A

CNN with data processing.ipynb

eeg_classification's People

Contributors

qianli-wu avatar yuntongju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.