https://airwiki.elet.polimi.it/index.php?title=Feature_Selection_and_Extraction_for_a_BCI_based_on_motor_imagery&feed=atom&action=historyFeature Selection and Extraction for a BCI based on motor imagery - Revision history2022-01-21T14:09:42ZRevision history for this page on the wikiMediaWiki 1.25.6https://airwiki.elet.polimi.it/index.php?title=Feature_Selection_and_Extraction_for_a_BCI_based_on_motor_imagery&diff=7138&oldid=prevFrancescoAmenta: New page: == '''Part 1: Project profile''' == === Project name === Spatial Filter application on a 4-class motor imagery BCI-system === Project short description === The aim of this project is ...2009-06-17T07:24:33Z<p>New page: == '''Part 1: Project profile''' == === Project name === Spatial Filter application on a 4-class motor imagery BCI-system === Project short description === The aim of this project is ...</p>
<p><b>New page</b></p><div>== '''Part 1: Project profile''' ==<br />
<br />
=== Project name ===<br />
<br />
Spatial Filter application on a 4-class motor imagery BCI-system <br />
<br />
=== Project short description ===<br />
<br />
The aim of this project is to explore and analyze algorithms, pointed out from literature, for spatial filtering in a BCI system based on 4-class motor imagery.<br />
<br />
=== Dates ===<br />
Start date: 0?/0?/2008<br />
<br />
End date: <br />
<br />
=== People involved ===<br />
<br />
<br />
===== Project head(s) =====<br />
<br />
* [[User:MatteoMatteucci | Matteo Matteucci]] (professor)<br />
<br />
===== Other Politecnico di Milano people =====<br />
<br />
* [[User:RossellaBlatt | Rossella Blatt]] (phd student)<br />
<br />
===== Students currently working on the project =====<br />
<br />
* [[User:FrancescoAmenta | Francesco Amenta]] (master student)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project will be mainly performed at AIRLab-IIT/Lambrate. The main activity consists in the acquisition of brain signals through an EEG amplifier for on-line or off-line processing. This is a potentially risky activity since there is an electrical instrumentation that is in direct contact with the human body. It is thus important to keep the system isolated from the power line. The EEG amplifier (as all biomedical instrumentations) is certified by the vendor to be isolated and the acquired data are transferred to the PC using an optic fiber connection . Anyhow for increased safety the PC and any other electronic device connected to the system must be disconnected from the power line.<br />
Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
<br />
== '''Part 2: Project description''' ==<br />
Main goal of this project it's to analyse application of Spatial Filter algorithm on a BCI system based on Motor Imagery. Mainly we want to test how much spatial filter' application could improve classification accuracy and also how to select best filter strategy for specific situation/subject. <br />
Some of the algorithms chosen for testing was developed to operate over bivariate data. To extend these, researchers have suggested a one-versus-rest approach. As subgoal inside main project's object we try to find a new way to extend algorithm to be able to operate over N-class contest. <br />
We have developed an analysis environment to be able to implements algorithms, derive spatial filter matrix from train dataset and then evaluate result on testing dataset. <br />
Selection of algorithm to analyze was made looking for the most performant once inside literature and also BCI Competition' results. After this preliminary selection three filter's algorithms was retained:<br />
*ICA<br />
*CSP<br />
*CSSD<br />
<br />
=== Brief description of Motor Imagery BCI architecture ===<br />
<br />
Even if all BCI system share the same goal, create a new communication pathway from mind to an external device, this isn't always true for architecture, due to different type of brain signal observed. However, we could trace a common design shared from most BCI application. Project work was focused on Signal Processing block, more specifically on Signal Filtering and Features Extraction subblock. <br />
<br />
=== Analysis Tool ===<br />
<br />
An off-line analysis tool was developed to generate spatial filter starting from data recorded by BCI2000 environments. Tool also provide functionality to test and visualize filters' application result. Tool was develop inside Matlasb environment due to compatibility with BCI2000 analysis tool and also for best deal computation effort mainly based on matrix manipulations.<br />
<br />
==== Prefiltering Module ====<br />
Prefiltering module preprocess data to remove unuseful information for filter generation process. Application provides two kinds of proprecess step: <br />
<!--*''' Whitening ''' White imported data removing mean and normalizing variance to 1--><br />
*''' Frequency filtering ''' [none,fir,iir] Bandpass filter imported data in selected frequency range. Provide Infinite Response Filter and Finite Response Filter.<br />
<br />
==== Filter Selection Module ====<br />
<br />
===== ICA =====<br />
<br />
Independent Component Analysis is a blind source separation technique applied to recover source from a mixture signal observation.<br />
ICA algorithm employees statistical mutual independence of component to extract source signal from mixture one. We found different algorithm depending on contrast function used to maximize independence. We analize two ICA algorithm, Infomax and FastICA, which seems to have good results when applied to BCI data.<br />
<br />
Information maximization algorithm, also know as '''Infomax''', was based on approach developed from Bell & Sejnowski, that find a solution maximization the joint entropy of the output H(y). This is the same to minimize mutual information I(y) of the output of a neural network. An implementation of this algorithm was found...<br />
Algorithm have many parameters:<br />
* '''learning rate''' Learning rate of neural network learning algorithm. Default value was set to <br />
* '''momentum''' Momentum of neural network learning algorithm. Default value was set to <br />
* '''bias''' <br />
* '''max step''' Maximum number of step that algorithm should be perform<br />
* '''initial weight''' A random matrix of initial weight<br />
* '''epsilon''' <br />
<br />
'''FastICA''' algorithm search for independent component maximizing the negentropy J(y) of each mixtured signal. <br />
Algorithm parameters are:<br />
* '''approach''' Value could be ''symmetric'', in which all signal was ,or ''deflaction''<br />
* '''nonlinarity''' Type of nonlinearity used to compute contrast function <br />
* '''epsilon''' Lowest bound of prediction error <br />
* '''max iteration''' <br />
* '''sample size''' [0,1] Percentage value of imported data to use as training set<br />
<br />
===== CSP =====<br />
<br />
Common Spatial Pattern algorithm simultaneous diagonalize covariance matrix of class labelled signals to find a linear subspace, i.e., a linear transformation matrix, in such a way that combined features maximize variance for one class and minimize its for other class. Standard CSP is designed for binary classification's problem, then extension to multi-class problem was done, as suggest in literature, by splitting original problem into several binary decision, computing each filter like one-vs-rest. After computing n matrix, with n number of class to analize, then algorithm output a spatial matrix <br />
Algorithm params that could be tuned are:<br />
* '''sample size''' [0,1] Percentage value of imported data to use as training set <br />
* '''retained eigenvalues''' Integer. Number(s) of eigenvalue(s) from each class matrix to retain in output spatial matrix. <br />
* '''tao''' [0,6] Time window over trial. Define a time window over trial' data to use as training data. <br />
* '''mode''' [1,2,3,4] Type of computed filter. <br />
===== CSSD =====<br />
<br />
Common Spatial Subsample Decomposition is a statistical method derived from common spatial pattern analysis. Also this method, like CSP, look for linear transformation of original signal to obtain combined features that hold maximum variance, i.e. most useful information for discriminant process, for selected class. <br />
Algorithm params that could be tuned are:<br />
* '''sample size''' [0,1] Percentage value of imported dato to use as training set<br />
* '''retained eigenvalues''' Integer. Number(s) of eigenvalue(s) from each class matrix to retain in output spatial matrix. <br />
* '''tao''' [0,6] Time window over trial. Define a time window over trial' data to use as training data.<br />
* '''mode''' [1,2,3,4] Type of computed filter.<br />
==== Filter Testing Module ====<br />
<br />
This module provides testing features for generated filters. Module grant tuning of testing environments by which tests filters and selection of statistical analysis to perform. Module also provide a graphical representation of computed statistical measures.<br />
<br />
Testing environment parameter are:<br />
*'''Feature Channel'''<br />
*'''Frequency Filter'''<br />
*'''Classification algorithm'''<br />
Statistical analysis type are:<br />
*'''R-square'''<br />
*'''Fisher ratio'''<br />
<br />
=== Usage ===<br />
<br />
User could access the tools by 3 main script. First script grant access to spatial filter computation. User must select subject, date of register session and witch type of filter would to compute. Second script use computed filter to preprocess data and then make a selection of extracted features trough genetic algorithm instructed to find a subset that maximize classification accuracy over train dataset. Then third and last script is designed to test filter and selected feature over test dataset. <br />
== '''Part 3: References''' ==<br />
* Control of two-dimensional movement signals by a noninvasive brain-computer interface in humans, Wolpaw J.R., McFarland J., PNAS, vol. 101, no. 51, december 2004, pages 17849-17854.<br />
* Brain Computer interfaces for communication and control, Wolpaw J.R., Birbaumer N., McFarland D., Pfurtsheller G., Vaughan T., Clinical Neurophysiology 113, 2002, 767-791<br />
* Spatial filtering and selection of optimized components in four class motor imagery EEG data using independent components analysis, Brunner C., Naeem M., Leeb R., Graimann B., and Pfurtscheller G. 2007. Pattern Recogn. Lett. 28, 8 (Jun. 2007), 957-964.<br />
* Boosting bit rates in noninvasive EEG single-trial classifications by feature combination and multiclass paradigms, Dornhege G.; Blankertz B.; Curio G.; Muller K.-R., Biomedical Engineering, IEEE Transactions on , vol.51, no.6, pp.993-1002, June 2004<br />
* Common spatial subspace decomposition applied to analysis of brain responses under multiple task conditions: a simulation study, Y. Wang, P. Berg, M. Scherg, Clinical Neurophysiology, Vol. 110, No. 4. (1 April 1999), pp. 604-614.<br />
== '''Part 4: Project Tracking''' ==</div>FrancescoAmenta