Difference between revisions of "BCI"
(21 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. Usually, tmax = 1200 ms and tmin = -300 ms. | + | 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. |
+ | |||
+ | The listed EEG datasets are expected to be of a maximum number of events to [[Error analysis|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 [https://en.wikipedia.org/wiki/10%E2%80%9320_system_(EEG) electrodes]. Usually, tmax = 1200 ms and tmin = -300 ms. So the data set is a 3-way design matrix <math>X</math> and a binary vector <math>y</math>. Sometimes the design matrix is 2-way after an EEG feature extraction procedure. | ||
+ | |||
+ | ===MNE tutorial datasets=== | ||
+ | * [https://mne.tools/dev/overview/datasets_index.html Example datasets] | ||
+ | |||
+ | ===Mobile BCI dataset=== | ||
+ | With scalp- and ear-EEGs with ERP and SSVEP paradigms while standing, walking, and running | ||
+ | * [https://arxiv.org/pdf/2112.04176v1.pdf ArXiv] | ||
+ | * [https://osf.io/r7s9b/ Data] | ||
+ | * [https://cs.paperswithcode.com/paper/mobile-bci-dataset-of-scalp-and-ear-eegs-with paperwithcode] | ||
+ | |||
+ | === Kaggle EEG data (2) === | ||
+ | From sensory tasks in Schizophrenia 9 GB with ERP | ||
+ | * [https://www.kaggle.com/datasets/broach/buttontonesz2 Kaggle] | ||
+ | * [https://www.kaggle.com/code/broach/get-started-w-mne-python-and-eeg-data Get started] | ||
+ | * [https://www.kaggle.com/datasets/broach/button-tone-sz First version of data] | ||
+ | === 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). | ||
+ | * [https://ftp.cngb.org/pub/gigadb/pub/10.5524/100001_101000/100990/ FTP] | ||
+ | * [http://doi.org/10.5524/100990 Paper] | ||
+ | |||
+ | === BCI Competition IV 2008 === | ||
+ | Motor imagery, classifier application, hand movement direction in MEG | ||
+ | * [https://www.bbci.de/competition/iv/#datasets HTML links to five datasets] | ||
+ | |||
+ | === 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 | ||
+ | * [https://osf.io/pq7vb/ Links] | ||
+ | |||
+ | ===NeuroKit Datasets=== | ||
+ | NeuroKit2: A Python toolbox for neurophysiological signal processing. NeuroKit includes datasets that can be used for testing. | ||
+ | * [https://neuropsychology.github.io/NeuroKit/functions/data.html#datasets Links] | ||
+ | * [https://link.springer.com/article/10.3758/s13428-020-01516-y Paper] | ||
== Continuous data == | == Continuous data == | ||
+ | * Neurotycho | ||
+ | * | ||
+ | |||
+ | ===Thinking out loud, an open-access EEG-based BCI dataset === | ||
+ | [https://github.com/N-Nieto/Inner_Speech_Dataset GitHub] | ||
+ | [https://rdcu.be/daiGz Nature] | ||
+ | |||
+ | ===SEED Dataset=== | ||
+ | A dataset collection for various purposes using EEG signals | ||
+ | * [https://bcmi.sjtu.edu.cn/~seed/seed.html Links] | ||
+ | ===DEAP Dataset=== | ||
+ | A Dataset for Emotion Analysis using EEG, Physiological, and Video Signals | ||
+ | * [https://www.eecs.qmul.ac.uk/mmv/datasets/deap/ Links] | ||
+ | |||
+ | === OpenNeuro: Search EEG portal === | ||
+ | * [https://openneuro.org/search/modality/eeg?query=%7B%22modality_selected%22%3A%22EEG%22%7D Search] | ||
+ | |||
+ | === Neiry-demons=== | ||
+ | Detection of ERP presence after stumulus. | ||
+ | * [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 == | ||
+ | Search through the list of papers with code | ||
+ | https://paperswithcode.com/search?q_meta=&q_type=&q=EEG | ||
+ | ===Python EEG ERP toolboxes=== | ||
+ | # PyRiemann, the main toolbox in this project [https://github.com/pyRiemann/pyRiemann], [https://pyriemann.readthedocs.io/en/latest/auto_examples/index.html#classification-of-erp] | ||
+ | # 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] | ||
+ | # 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] | ||
+ | # EEGNet [https://github.com/vlawhern/arl-eegmodels/tree/master/examples] | ||
+ | # Gumpy does not download data automatically, no way | ||
+ | |||
+ | ===GP and Space-State Models=== | ||
+ | # State Space Models, the latest one S4 [https://github.com/srush/annotated-s4/] | ||
+ | # GPPython, for Gaussian process modeling (now the sklearn models are used) | ||
+ | # GPy, Gaussian Process framework in Python [https://gpy.readthedocs.io/en/deploy/] | ||
+ | ===Matlab Toolboxes=== | ||
+ | # Signal processing, etc. goes with Matlab [https://www.mathworks.com/discovery/feature-extraction.html] | ||
+ | # EDF file analyzer [https://www.mathworks.com/help/signal/ref/edffileanalyzer-app.html] | ||
+ | # EEGLAB | ||
+ | # FieldTrip [https://www.fieldtriptoolbox.org/] | ||
+ | # The BBCI Toolbox is a Brain-Computer Interface (BCI) toolbox [https://github.com/bbci/bbci_public] | ||
+ | # ERP Connectivity EMG Analysis [https://github.com/EsiSeraj/ERP_Connectivity_EMG_Analysis] | ||
== Experiments == | == Experiments == | ||
Line 28: | 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 | ||
− | === | + | ===Accelerometer data=== |
* Energy | * Energy | ||
− | |||
===Tensor product and spectral decomposition=== | ===Tensor product and spectral decomposition=== | ||
Line 53: | Line 148: | ||
* Sampling principle | * Sampling principle | ||
* VAE as PPCA encoder-decoder | * VAE as PPCA encoder-decoder | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 21:11, 22 November 2024
Contents
Datasets
- 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
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
- Multimodal Humor Dataset: Git, Paper
- ECG and Galvanic Skin Response Kaggle
- Audio datasets: TDS review
- PhysioNet 2014 challenge
- Freezing of Gate in Parkinson Disease: 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]
Tools
Search through the list of papers with code https://paperswithcode.com/search?q_meta=&q_type=&q=EEG
Python EEG ERP toolboxes
- PyRiemann, the main toolbox in this project [1], [2]
- Event Related Potentials, explains how to extract Event Related Potentials [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]
- PyEEG [5], the Reference Guide shows a poor list of functions
- HTNet [6]
- EEGNet [7]
- Gumpy does not download data automatically, no way
GP and Space-State Models
- State Space Models, the latest one S4 [8]
- GPPython, for Gaussian process modeling (now the sklearn models are used)
- GPy, Gaussian Process framework in Python [9]
Matlab Toolboxes
- Signal processing, etc. goes with Matlab [10]
- EDF file analyzer [11]
- EEGLAB
- FieldTrip [12]
- The BBCI Toolbox is a Brain-Computer Interface (BCI) toolbox [13]
- 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:
- Comprehensive introduction
- Practical example with code and homework
- Algebraic part of modeling
- Statistical part of modeling
- Join them in Hilbert (or any convenient) space
- 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