Giter Site home page Giter Site logo

eeg-classification's Introduction

#Summary

In this notebook:

  • About the dataset
    • Background
    • Data description
    • Source of dataset
  • Project
    • Importing libraries
    • Loading data
    • Data analysis
    • Molding data
    • Developing CNN model
    • Model evaluation
    • Bonus: Optimized classifier with 4 channels of EEG
  • Conclusion

About the dataset

Background

Electroencephalography (EEG) is a non-invasive method used to record electrical activity in the brain. By placing electrodes on the scalp, EEG captures the oscillatory patterns generated by neural activity, which are then amplified and digitized for analysis. This technique is widely used in both clinical and research settings to monitor brain function, diagnose neurological conditions such as epilepsy, and study cognitive processes. EEG is particularly valued for its high temporal resolution, allowing researchers to track changes in brain activity on the order of milliseconds. However, the spatial resolution of EEG is relatively low, as the recorded signals are an aggregate of electrical activity from large populations of neurons. Despite this limitation, EEG remains a powerful tool for exploring the dynamics of the brain in real time, offering insights into everything from sleep patterns to the neural correlates of sensory perception and motor control.

A collaborative project between CU Anschutz and ULN has focused on collecting EEG data from subjects as they engage in mental visualization of motor-based tasks. During these sessions, participants were instructed to visualize performing two types of tasks: one that was highly familiar to them and another that was unfamiliar. The primary objective of this study is to develop a classifier capable of accurately distinguishing between the EEG patterns associated with familiar and unfamiliar task visualizations. By analyzing the neural signatures captured during these sessions, the project aims to advance our understanding of how familiarity with a task influences brain activity and to create a reliable tool for identifying the nature of the task being visualized based on EEG data. This research has significant implications for fields such as neurorehabilitation, where understanding and enhancing motor imagery could play a critical role in recovery and training protocols.

Data description

Each .csv file consist of 14 channels of EEG data from 14 probes places around the scalp. The end of the name of the file signifies if the file contains data of familiar (KS) or unfamiliar (US)movement brain state. The sampling rate is 128 hz. Each of 8 subjects participated in two 1 minute sessions. Therefore the total number of datapoints is on the order of 14x128x60x8x2 = 1,720,320.

Alt Text

Source of dataset

The source of is EEG-Classification project by Tevis Gehr, a collaboration with Nebraska Athetic Performance Lab at University of Nebraska and University of Colorado Anschutz.

This project seeks to improve upon his work.

Conclusion

The data has been loaded, molded into the right format and trained upon. Simple CNN model has done well and after 30 epochs reached almost 94% accuracy. This is an improvment of Mr. Tevis Gehr project which reached 85% accuracy. In his words:

This is likely high enough to enable a new level of performance with brain-computer interface (BCI) technologies.

However, the best results were obtained when the network was trained on samples from the same recording session. While this may be practical for basic brain research, it would be less practical for use in BCI technology.

Regarding optimization, the reduced amount of channels to 4 gave a result of just 83% accuracy. This is still promising result, as it shows there are clear tendencies but some information seems to be a lost or harder to access. Further work upon this concept could be done by changing hyper parameters or number of training epochs of the model. However, for my purposes this is good enough.

eeg-classification's People

Contributors

zygfrydiens avatar

Watchers

 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.