Automated Classification of L/R Hand Movement EEG Signals using Advanced Feature Extraction and Machine Learning

In this paper, we propose an automated computer platform for the purpose of classifying Electroencephalography (EEG) signals associated with left and right hand movements using a hybrid system that uses advanced feature extraction techniques and machine learning algorithms. It is known that EEG represents the brain activity by the electrical voltage fluctuations along the scalp, and Brain-Computer Interface (BCI) is a device that enables the use of the brain neural activity to communicate with others or to control machines, artificial limbs, or robots without direct physical movements. In our research work, we aspired to find the best feature extraction method that enables the differentiation between left and right executed fist movements through various classification algorithms. The EEG dataset used in this research was created and contributed to PhysioNet by the developers of the BCI2000 instrumentation system. Data was preprocessed using the EEGLAB MATLAB toolbox and artifacts removal was done using AAR. Data was epoched on the basis of Event-Related (De) Synchronization (ERD/ERS) and movement-related cortical potentials (MRCP) features. Mu/beta rhythms were isolated for the ERD/ERS analysis and delta rhythms were isolated for the MRCP analysis. The Independent Component Analysis (ICA) spatial filter was applied on related channels for noise reduction and isolation of both artifactually and neutrally generated EEG sources. The final feature vector included the ERD, ERS, and MRCP features in addition to the mean, power and energy of the activations of the resulting independent components of the epoched feature datasets. The datasets were inputted into two machine-learning algorithms: Neural Networks (NNs) and Support Vector Machines (SVMs). Intensive experiments were carried out and optimum classification performances of 89.8 and 97.1 were obtained using NN and SVM, respectively.


I. INTRODUCTION
The importance of understanding brain waves is increasing with the ongoing growth in the Brain-Computer Interface (BCI) field, and as computerized systems are becoming one of the main tools for making people's lives easier, BCI or Brain-Machine Interface (BMI) has become an attractive field of research and applications, BCI is a device that enables the use of the brain's neural activity to communicate with others or to control machines, artificial limbs, or robots without direct physical movements [1][2][3][4].
The term "Electroencephalography" (EEG) is the process of measuring the brain's neural activity as electrical voltage fluctuations along the scalp that results from the current flows in brain's neurons [5].In a typical EEG test, electrodes are fixed on the scalp to monitor and record the brain's electrical activity [6].BCI measures EEG signals associated with the user's activity then applies different signal processing algorithms for the purpose of translating the recorded signals into control commands for different applications [7].
The most important application for BCI is helping disabled individuals by offering a new way of communication with the external environment [8].Many BCI applications were described in [9] including controlling devices like video games and personal computers using thoughts translation.BCI is a highly interdisciplinary research topic that combines medicine, neurology, psychology, rehabilitation engineering, Human-Computer Interaction (HCI), signal processing and machine learning [10].
The strength of BCI applications lies in the way we translate the neural patterns extracted from EEG into machine commands.The improvement of the interpretation of these EEG signals has become the goal of many researchers; hence, our research work explores the possibility of multi-trial EEG classification between left and right hand movements in an offline manner, which will enormously smooth the path leading to online classification and reading of executed movements, leading us to what we can technically call "Reading Minds".
In this work, we introduce an automated computer system that uses advanced feature extraction techniques to identify some of the brain activity patterns, especially for the left and right hand movements.The system then uses machine learning algorithms to extract the knowledge embedded in the recorded patterns and provides the required decision rules for translating thoughts into commands (as seen in Fig. 1).This article is organized as follows: a brief review of related research work is provided in Section II.In Section III, the dataset used in this study is described.The automated feature extraction process is described in Section IV.The generation of our training/testing datasets and the practical implementation and system evaluation are discussed in Section V. Conclusions and suggested future work are provided in Section VI. www.ijacsa.thesai.org

II. LITERATURE REVIEW
The idea of BCI was originally proposed by Jaques Vidal in [11] where he proved that signals recorded from brain activity could be used to effectively represent a user's intent.In [12], the authors recorded EEG signals for three subjects while imagining either right or left hand movement based on a visual cue stimulus.They were able to classify EEG signals into right and left hand movements using a neural network classifier with an accuracy of 80% and concluded that this accuracy did not improve with increasing number of sessions.The author of [13] used features produced by Motor Imagery (MI) to control a robot arm.Features such as the band power in specific frequency bands (alpha: 8-12Hz and beta: 13-30Hz) were mapped into right and left limb movements.In addition, they used similar features with MI, which are the Event Related Desynchronization and Synchronization (ERD/ERS) comparing the signal's energy in specific frequency bands with respect to the mentally relaxed state.It was shown in [14] that the combination of ERD/ERS and Movement-Related Cortical Potentials (MRCP) improves EEG classification as this offers an independent and complimentary information.
In [15], a hybrid BCI control strategy is presented.The authors expanded the control functions of a P300 potential based BCI for virtual devices and MI related sensorimotor rhythms to navigate in a virtual environment.Imagined left/right hand movements were translated into movement commands in a virtual apartment and an extremely high testing accuracy results were reached.
A three-class BCI system was presented in [16] for the translation of imagined left/right hands and foot movements into commands that operates a wheelchair.This work uses many spatial patterns of ERD on mu rhythms along the sensory-motor cortex and the resulting classification accuracy for online and offline tests was 79.48% and 85.00%, respectively.The authors of [17] proposed an EEG-based BCI system that controls hand prosthesis of paralyzed people by movement thoughts of left and right hands.They reported an accuracy of about 90%.
A single trial right/left hand movement classification is reported in [18].The authors analyzed both executed and imagined hand movement EEG signals and created a feature vector consisting of the ERD/ERS patterns of the mu and beta rhythms and the coefficients of the autoregressive model.Artificial Neural Networks (ANNs) is applied to two kinds of testing datasets and an average recognition rate of 93% is achieved.
The strength of BCI applications depends lies in the way we translate the neural patterns extracted from EEG into machine commands.The improvement of the interpretation of these EEG signals has become the goal of many researchers; hence, our research work explores the possibility of multi-trial EEG classification between left and right hand movements in an offline manner, which will enormously smooth the path leading to online classification and reading of any executed movements, leading us to what we can technically call "Reading Minds".

A. Description of the Dataset
The EEG dataset used in this research was created and contributed to PhysioNet [19] by the developers of the BCI2000 [20] instrumentation system.The dataset is publically available at http://www.physionet.org/pn4/eegmmidb/.
The dataset consists of more than 1500 EEG records, with different durations (one or two minutes per record), obtained from 109 healthy subjects.Subjects were asked to perform different motor/imagery tasks while EEG signals were recorded from 64 electrodes along the surface of the scalp.Each subject performed 14 experimental runs: The 64-channels EEG signals were recorded according to the international 10-20 system (excluding some electrodes) as seen in Fig. 2. www.ijacsa.thesai.org

B. The Subset used in the Current Work
From this dataset, we selected the three (two-minute) runs of the first task described above (opening and closing the left/right fist based on a target that appears on left or right side of the screen).These runs include EEG data for executed hand movements.
We created an EEG data subset corresponding to the first six subjects (S001, S002, S003, S004, S005, and S006) including three runs of executed movement specifically per subject for a total of 18 two-minute records.

A. Channel Selection
According to [6], many of the EEG channels appeared to represent redundant information.It is shown in [21,22] that the neural activity that is correlated to the executed left and right hand movements is almost exclusively contained within the channels C3, C4, and CZ of the EEG channels of Fig. 2.This means that there is no need to analyze all 64 channels of data.
On the other hand, only eight electrode locations are commonly used for MRCP analysis covering the regions between frontal and central sites (FC3, FCZ, FC4, C3, C1, CZ, C2, and C4) [14].These channels were used for the Independent Component Analysis (ICA) discussed later in the current section (Fig. 3).

B. Filtering
Because EEG signals are known to be noisy and nonstationary, filtering the data is an important step to get rid of unnecessary information from the raw signals.EEGLAB [23], which is an interactive MATLAB toolbox, was used to filter EEG signals.
A band pass filter from 0.5 Hz to 90 Hz was applied to remove the DC (direct current) shifts and to minimize the presence of filtering artifacts at epoch boundaries.A Notch filter was also applied to remove the 50 Hz line noise.

C. Automatic Artifact Removal (AAR)
The EEG data of significance is usually mixed with huge amounts of useless data produced by physiological artifacts that masks the EEG signals [24].These artifacts include eye and muscle movements and they constitute a challenge in the field of BCI research.AAR automatically removes artifacts from EEG data based on blind source separation and other various algorithms.
The AAR toolbox [25] was implemented as an EEGLAB plug-in in MATLAB and was used to process our EEG data subset on two stages: Electrooculography (EOG) removal using the Blind Source Separation (BSS) algorithm then Electromyography (EMG) Removal using the same algorithm [26].
On the other hand, delta rhythms can be extracted from the motor cortex, within the pre-movement stage, and this is referred to MRCP.The slow (less than 3 Hz) MRCP is associated with an event-related negativity that occurs 1-2 seconds before the onset of movement [28,29].
In our experiments, we extracted time-locking events with type = 3 (left hand) or type = 4 (right hand) with different epoch limits and types of analysis:  ERD analysis: epoch limits from -2 to 0 seconds. ERS analysis: epoch limits from 4.1 to 5.1 seconds.

E. Independent Component Analysis (ICA)
After the AAR process, ICA was used to parse the underlying electrocortical sources from EEG signals that are affected by artifacts [30,31].Data decomposition using ICA changes the basis linearly from data that are collected at single scalp channels to a spatially transformed virtual channel basis.Each row of the EEG data in the original scalp channel data represents the time course of accumulated differences between source projections to a single data channel and one or more reference channels [32].

F. Rhythm Isolation
A short IIR band pass filter from 8 to 30 Hz was applied on the ERD/ERS epoched datasets of the experiment for the purpose of isolating mu/beta rhythms.Another short IIR lowpass filter of 3 Hz was applied on MRCP epoched datasets for isolating delta rhythms.The result of this was 6 files for each run: ERD/ERS and MRCP for both left and right hand movements for each subject.

A. Feature Vectors Construction and Numerical Representation
After the EEG datasets were analyzed as described in the previous section, the activation vectors were calculated for each of the resulted epochs' datasets as the multiplication of the ICA weights and ICA sphere for each dataset subtracting the mean of the raw data from the multiplication results.
Then, the mean, power, and energy of the activations were calculated to construct the feature vectors.For each subject's single run, 6 feature vectors were extracted as <Power (8 features), Mean (8 features), Energy (8 features), Type (1 feature: ERS/ERD/MRCP), Side (1 target: Left/Right)> resulting in a 10826 feature matrix.
The constructed features were represented in a numerical format that is suitable for use with machine learning algorithms [33,34].Every column in the features matrices was normalized between 0.1 and 0.9 such that the datasets could be inputted to the learning algorithms described in the next subsection.

B. Machine Learning Algorithms
In this work, Neural Networks (NNs) and Support Vector Machines (SVMs) algorithms were optimized for the purpose of classifying EEG signals into right and left hand movements.A detailed description of these learning algorithms can be found in [35] and [36].
The MATLAB neural networks toolbox was used for all NN experiments.The number of input features (25 features) determined the number of input nodes for NN and the number of different target functions (1 output: left or right) determined the number of output nodes.Training was handled with the aid of the back-propagation learning algorithm [37].
All SVM experiments were carried out using the "MySVM" software [38].SVM can be performed with different kernels and most of them were reported to provide similar results for similar applications [6].So, the Anova-Kernel SVM was used in this work.

C. Optimisation and Results
In all experiments, 80% samples were randomly selected and used for training and the remaining 20% for testing.This was repeated 10 times, and in each time the datasets were randomly mixed.
For each experiment, the number of hidden nodes for NN varied from 1 to 20.In SVM, each of the degree and gamma parameters varied from 1 to 10.The mean of the accuracy was calculated for each ten training-testing pairs.The features that were used as inputs to NN and SVM are symbolized as follows:  P: the power.
 M: the mean.
The results of the experiment are summarized in the Table I.It is clear from the testing results that SVM outperforms NN in most experiments.An SVM topology of degree = 4 and gamma = 4 provides an accuracy of 97.1% if tested with the power, energy and type inputs of the experiment.A NN of 10 hidden layers can provide an accuracy of 86.5% if all features are used.These results clearly show that the use of advanced feature extraction techniques provides good and clear properties that can be translated using machine learning into machine commands.
The next best SVM performance (94.1%) is achieved using the energy and type features.In general, there has been an increase in the classification performance with the use of more discriminative features, such as the total energy, compared to the power and mean inputs.

VI. CONCLUSIONS AND FUTURE RESEARCH
This paper focuses on the classification of EEG signals for right and left fist movements based on a specific set of features.Very good results were obtained using NNs and SVMs showing that offline discrimination between right and left movement, for executed hand movements, is comparable to leading BCI research.Our methodology is not the best, but is somewhat a simplified efficient one that satisfies the needs for researchers in field of neuroscience.
In the near future, we aim to develop and implement our system in online applications, such as health systems and computer games.In addition, more datasets has to be analyzed for a better knowledgeable extraction and more accurate decision rules.

Fig. 1 .
Fig. 1.Feature extraction and translation into machine commands

oo
A one-minute baseline runs (with eyes open)  A one-minute baseline runs (with eyes closed)  Three two-minute runs of each of the four following tasks: The left or right side of the screen shows a target.The subject keeps opening and closing the corresponding fist until the target disappears.Then he relaxes.o The left or right side of the screen shows a target.The subject imagines opening and closing the corresponding fist until the target disappears.Then he relaxes.o The top or bottom of the screen.A target appears on either.The subject keeps opening and closing either both fists (in case of a top-target) or both feet (in case of a bottom-target) until the target disappears.Then he relaxes.The top or bottom of the screen A target appears on either.The subject imagines opening and closing either both fists (in case of a top-target) or both feet (in case of a bottom-target) until the target disappears.Then he relaxes.

TABLE I .
RESULTS FOR EXPERIMENT B.