Giter Club home page Giter Club logo

motor-imagery-based-bci's Introduction

Motor-Imagery-based-BCI

A subject-dependent brain-computer interface based on motor imagery mental strategy.

Data preparation and Preprocessing

The dataset consists of EEG data from 9 subjects. The cue-based BCI paradigm consisted of four different motor imagery tasks, namely the imagination of movement of the left hand (class 1), right hand (class 2), both feet (class 3), and tongue (class 4). Two sessions on different days were recorded for each subject. Each session is comprised of 6 runs separated by short breaks. One run consists of 48 trials (12 for each of the four possible classes), yielding a total of 288 trials per session. 22 EEG channels, and 3 EOG channels

We apply 3 techniques for preprocessing the signals: Band Pass Filter: Bandpass filtering is performed using a sixth order Butterworth bandpass filter with low cut of 8 Hz and high cut of 30 Hz. This choice is because of the fact that motor imagery features generally happen in the alpha and beta bands of EEG. Common Average Referencing (CAR) Spatial Filtering: enhances the local activity at electrode I by subtracting the average over all electrodes. Normalization: Each channel is used its own mean and standard deviation.

Before Preprocessing

After Preprocessing

Feature extraction

The main idea is to use a linear transform to project the multichannel EEG data into low-dimensional spatial subspace with a projection matrix, of which each row consists of weights for channels.

1- We used Build in CSP from MNE library to extract features
2- We used Wavelet to extract features

Classifier used and its parameters


1- Random Forest
2- SVM ((decision_function_shape='ovo'), ( kernel='rbf',gamma=0.5,C=0.1), (kernel='poly',degree=3,C=1))
3- KNN (n_neighbors=4)
4- Logistic Regression (multi_class='ovr', solver='liblinear')

Classification results


In CSP, The best accuracy is Logistic Regression with 86%
In wavelet, The best accuracy is Logistic Regression with 76%

Screenshots for the interface

motor-imagery-based-bci's People

Contributors

abdelrahman-rashad avatar ahmads1990 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.