Difference between revisions of "BCI"

From Research management course
Jump to: navigation, search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{#seo:
 +
|title=Brain Computer Interface
 +
|titlemode=append
 +
|keywords=Brain Computer Interface
 +
|description=The course Brain-Computer Interfaces and Functional Data Analysis enlightens fundamental mathematical concepts of brain signal analysis
 +
}}
 
== Datasets ==
 
== Datasets ==
 +
# An open-access dataset of naturalistic viewing using simultaneous EEG-fMRI [https://www.nature.com/articles/s41597-023-02458-8 Nature: scientific data 2023]
 +
 
== ERP data ==
 
== ERP data ==
 
Event-related potential, see [https://en.wikipedia.org/wiki/Event-related_potential ERP] and [https://en.wikipedia.org/wiki/P300_(neuroscience) P300] is triggered by a stimulus and registered over [https://en.wikipedia.org/wiki/Electroencephalography EEG] monitor electrodes after the stimulus onset and before it.  
 
Event-related potential, see [https://en.wikipedia.org/wiki/Event-related_potential ERP] and [https://en.wikipedia.org/wiki/P300_(neuroscience) P300] is triggered by a stimulus and registered over [https://en.wikipedia.org/wiki/Electroencephalography EEG] monitor electrodes after the stimulus onset and before it.  
Line 23: Line 31:
  
 
=== The Nencki-Symfonia EEG/ERP dataset ===
 
=== The Nencki-Symfonia EEG/ERP dataset ===
First, data validation confirmed acceptable quality of the obtained EEG signals. Typical event-related potential (ERP) waveforms were obtained, as expected, for attention and cognitive control tasks (i.e., N200, P300, N450).
+
First, data validation confirmed the acceptable quality of the obtained EEG signals. Typical event-related potential (ERP) waveforms were obtained, as expected, for attention and cognitive control tasks (i.e., N200, P300, N450).
 
* [https://ftp.cngb.org/pub/gigadb/pub/10.5524/100001_101000/100990/ FTP]
 
* [https://ftp.cngb.org/pub/gigadb/pub/10.5524/100001_101000/100990/ FTP]
 
* [http://doi.org/10.5524/100990 Paper]
 
* [http://doi.org/10.5524/100990 Paper]
Line 62: Line 70:
 
Detection of ERP presence after stumulus.
 
Detection of ERP presence after stumulus.
 
* [https://gin.g-node.org/v-goncharenko/neiry-demons Gin]
 
* [https://gin.g-node.org/v-goncharenko/neiry-demons Gin]
 +
 +
==Low-frequency spatial time series==
 +
# Multimodal Humor Dataset: [https://delta-lab-iitk.github.io/Multimodal-Humor-Dataset/ Git], [https://sci-hub.hkvisa.net/10.1109/wacv48630.2021.00062 Paper]
 +
# ECG and Galvanic Skin Response [https://www.kaggle.com/datasets/danielfesalbon/young-adults-affective-data-ecg-and-gsr-signals Kaggle]
 +
# Audio datasets: [https://towardsdatascience.com/40-open-source-audio-datasets-for-ml-59dc39d48f06 TDS review]
 +
# PhysioNet 2014 [https://physionet.org/content/challenge-2014/1.0.0/ challenge]
 +
# Freezing of Gate in Parkinson Disease: [https://data.mendeley.com/datasets/t8j8v4hnm4 Mendeley]
 +
# Detecting Music-Induced Emotion [https://datahub.hku.hk/articles/dataset/HKU956_Dataset_in_Detecting_Music-Induced_Emotion_Based_on_Acoustic_Analysis_and_Physiological_Sensing_A_Multimodal_Approach_/21080821
 +
paper with data]
 +
# Accelerometer and gyroscope: [https://zenodo.org/record/3925679#.Y-NYYdJBwVA data], [https://www.kaggle.com/datasets/malekzadeh/motionsense-dataset Kaggle]
  
 
== Tools ==
 
== Tools ==
Line 70: Line 88:
 
# Event Related Potentials, explains how to extract Event Related Potentials [http://learn.neurotechedu.com/erp/#:~:text=Feature%20extraction%20is%20the%20process,the%20accuracy%20of%20the%20BCI]
 
# Event Related Potentials, explains how to extract Event Related Potentials [http://learn.neurotechedu.com/erp/#:~:text=Feature%20extraction%20is%20the%20process,the%20accuracy%20of%20the%20BCI]
 
# NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing Stress on ECG, slightly on EEG, not ERP, provides a comprehensive suite of processing routines for a variety of bodily signals (e.g., ECG, PPG, EDA, EMG, RSP) [https://doi.org/10.3758/s13428-020-01516-y]
 
# NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing Stress on ECG, slightly on EEG, not ERP, provides a comprehensive suite of processing routines for a variety of bodily signals (e.g., ECG, PPG, EDA, EMG, RSP) [https://doi.org/10.3758/s13428-020-01516-y]
# PyEEG [https://code.google.com/archive/p/pyeeg], the Reference Guide shows poor list of functions
+
# PyEEG [https://code.google.com/archive/p/pyeeg], the Reference Guide shows a poor list of functions
 
# HTNet [https://github.com/BruntonUWBio/HTNet_generalized_decoding]
 
# HTNet [https://github.com/BruntonUWBio/HTNet_generalized_decoding]
 
# EEGNet [https://github.com/vlawhern/arl-eegmodels/tree/master/examples]
 
# EEGNet [https://github.com/vlawhern/arl-eegmodels/tree/master/examples]
# Gumpy does not downloads data automatically, no way
+
# Gumpy does not download data automatically, no way
  
 
===GP and Space-State Models===
 
===GP and Space-State Models===
Line 85: Line 103:
 
# EEGLAB
 
# EEGLAB
 
# FieldTrip [https://www.fieldtriptoolbox.org/]
 
# FieldTrip [https://www.fieldtriptoolbox.org/]
# The BBCI Toolbox is a Brain-Computer Interface (BCI) toolbox [https://github.com/bbci/bbci_public
+
# The BBCI Toolbox is a Brain-Computer Interface (BCI) toolbox [https://github.com/bbci/bbci_public]
ERP_Connectivity_EMG_Analysis]
+
# ERP Connectivity EMG Analysis [https://github.com/EsiSeraj/ERP_Connectivity_EMG_Analysis]
  
 
== Experiments ==
 
== Experiments ==
Line 106: Line 124:
 
===SSA, SVD, PCA===
 
===SSA, SVD, PCA===
 
* non-parametric phase space Hankel matrix
 
* non-parametric phase space Hankel matrix
* convoluion ?
+
* convoluion?
 
* forecasting with SSA
 
* forecasting with SSA
  
Line 130: Line 148:
 
* Sampling principle
 
* Sampling principle
 
* VAE as PPCA encoder-decoder
 
* VAE as PPCA encoder-decoder
 
==Introduction to BCI==
 
 
==Decoding problem==
 
 
==Models of BCI==
 
 
==References==
 

Latest revision as of 21:11, 22 November 2024

Datasets

  1. An open-access dataset of naturalistic viewing using simultaneous EEG-fMRI Nature: scientific data 2023

ERP data

Event-related potential, see ERP and P300 is triggered by a stimulus and registered over EEG monitor electrodes after the stimulus onset and before it.

The listed EEG datasets are expected to be of a maximum number of events to test the models. So the idea of collecting these data is to analyze a model on various data.

The ERP refers to the classification problem. The stimulus belongs to a class label from a given set. The event, starting from the stimulus onset, is a classification object. The Object description is the time series from tmin to tmax over the electrodes. Usually, tmax = 1200 ms and tmin = -300 ms. So the data set is a 3-way design matrix \(X\) and a binary vector \(y\). Sometimes the design matrix is 2-way after an EEG feature extraction procedure.

MNE tutorial datasets

Mobile BCI dataset

With scalp- and ear-EEGs with ERP and SSVEP paradigms while standing, walking, and running

Kaggle EEG data (2)

From sensory tasks in Schizophrenia 9 GB with ERP

The Nencki-Symfonia EEG/ERP dataset

First, data validation confirmed the acceptable quality of the obtained EEG signals. Typical event-related potential (ERP) waveforms were obtained, as expected, for attention and cognitive control tasks (i.e., N200, P300, N450).

BCI Competition IV 2008

Motor imagery, classifier application, hand movement direction in MEG

International BCI Competition 2020

Five tracks: Few-shot EEG learning, Microsleep detection from single-channel EEG, Imagined speech classification, Upper-limb movements decoding in a single-arm, EEG(+Ear-EEG)-based ERP detection during walking

NeuroKit Datasets

NeuroKit2: A Python toolbox for neurophysiological signal processing. NeuroKit includes datasets that can be used for testing.

Continuous data

  • Neurotycho

Thinking out loud, an open-access EEG-based BCI dataset

GitHub Nature

SEED Dataset

A dataset collection for various purposes using EEG signals

DEAP Dataset

A Dataset for Emotion Analysis using EEG, Physiological, and Video Signals

OpenNeuro: Search EEG portal

Neiry-demons

Detection of ERP presence after stumulus.

Low-frequency spatial time series

  1. Multimodal Humor Dataset: Git, Paper
  2. ECG and Galvanic Skin Response Kaggle
  3. Audio datasets: TDS review
  4. PhysioNet 2014 challenge
  5. Freezing of Gate in Parkinson Disease: Mendeley
  6. Detecting Music-Induced Emotion [https://datahub.hku.hk/articles/dataset/HKU956_Dataset_in_Detecting_Music-Induced_Emotion_Based_on_Acoustic_Analysis_and_Physiological_Sensing_A_Multimodal_Approach_/21080821

paper with data]

  1. Accelerometer and gyroscope: data, Kaggle

Tools

Search through the list of papers with code https://paperswithcode.com/search?q_meta=&q_type=&q=EEG

Python EEG ERP toolboxes

  1. PyRiemann, the main toolbox in this project [1], [2]
  2. Event Related Potentials, explains how to extract Event Related Potentials [3]
  3. NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing Stress on ECG, slightly on EEG, not ERP, provides a comprehensive suite of processing routines for a variety of bodily signals (e.g., ECG, PPG, EDA, EMG, RSP) [4]
  4. PyEEG [5], the Reference Guide shows a poor list of functions
  5. HTNet [6]
  6. EEGNet [7]
  7. Gumpy does not download data automatically, no way

GP and Space-State Models

  1. State Space Models, the latest one S4 [8]
  2. GPPython, for Gaussian process modeling (now the sklearn models are used)
  3. GPy, Gaussian Process framework in Python [9]

Matlab Toolboxes

  1. Signal processing, etc. goes with Matlab [10]
  2. EDF file analyzer [11]
  3. EEGLAB
  4. FieldTrip [12]
  5. The BBCI Toolbox is a Brain-Computer Interface (BCI) toolbox [13]
  6. ERP Connectivity EMG Analysis [14]

Experiments

Brain-Computer Interfaces and Functional Data Analysis

This course is under construction. It enlightens fundamental mathematical concepts of brain signal analysis.

Each class combines five parts:

  1. Comprehensive introduction
  2. Practical example with code and homework
  3. Algebraic part of modeling
  4. Statistical part of modeling
  5. Join them in Hilbert (or any convenient) space
  6. Quiz for the next part (could be in the beginning) to show the theory to catch up

Linear models

SSA, SVD, PCA

  • non-parametric phase space Hankel matrix
  • convoluion?
  • forecasting with SSA

Accelerometer data

  • Energy

Tensor product and spectral decomposition

  • vector, covector, dot product
  • linear operator
  • in Euclidean and (Hilbert space with useful example) dot product=bilinear form
  • bilinear form
  • factorization
  • spectral decomposition
  • SVD
  •  ??? SVD in Hilbert space

Why do we go from Eucledian to Hilbert space? Was: a vector as a number of measurements. Now it is a finite number of samples. Then it is a distribution of samples. The distribution is a point in the Hilbert space. We can make an inner product and tensor product of two and more distributions. Machine learning: given samples, multivariate distribution can be represented as a (direct?) sum of elements' tensor products.

PPCA

  • PPCA
  • How to tell stochastic from deterministic variable? Are expectation and variance deterministic?
  • Recap: joint and conditional distribution, marginalization.
  • Sampling principle
  • VAE as PPCA encoder-decoder