Classification of Non-Discriminant ERD/ERS Comprising Motor Imagery Electroencephalography Signals With Novel REP-based Approach

Classification of Motor Imagery (MI) Electroencephalography (EEG) signals has always been an important aspect of Brain Computer Interface (BCI) systems. Event Related Desynchronization (ERD)/ Event Related Synchronization (ERS) plays a significant role in finding discriminant features of MI EEG signals. ERD/ERS is one type and Evoked Potential (EP) is another type of brain response. This study focuses upon the classification of MI EEG signals by Removing Evoked Potential (REP) from non-discriminant MI EEG data in filter band selection, called REP. This optimization is done to enhance the classification performance. A comprehensive comparison of several pipelines is presented by using famous feature extraction methods, namely Common Spatial Pattern (CSP), XDawn. The effectiveness of REP is demonstrated on the PhysioNet dataset which is an online data resource. Comparison is done between the performance of pipelines including proposed one (Common Spatial Pattern (CSP) and Gaussian Process Classifier (GPC)) as well as before and after applying REP. It is observed that the REP approach has improved the classification accuracy of all the subjects used as well as all the pipelines, including state of the art algorithms, up to 20%. Keywords—MI EEG Signals; non-discriminant ERD/ERS; evoked potentials; common spatial pattern; Gaussian process classifier


I. INTRODUCTION
Advancement in technology leads to facilitate handicapped personals in daily activities like normal persons. This can be achieved by bridging the space between machines and humans, the latest research is oriented towards using brain waves for directly interacting with computers in the form of Brain Computer Interface (BCI), without using any motor activity [1]. Brain waves are non-stationary signals generated by the brain. These are acquired by many methods; one of them is Electroencephalography (EEG). This is the first noninvasive (non-surgical) method and is very popular in recent researches [2]. For simple task detection, stimuli are observed in EEG signals by finding a change in the electrical activity of brain signals. If these signals are generated as a result of imagining any motor activity such waves are called Motor Imagery (MI) EEG signals.
This paper focuses on the study of MI EEG signals. When a person thinks about an activity, an event is generated. This event can be blinking of an eye or movement of hands, tongue or feet. Events related to motor activities are called motor movements. In the brain, these signals are produced inside the motor cortex region. Electrodes can be placed on the motor cortex region to get these signals. EEG signals can have different frequencies and depending upon these frequencies, signals are divided into various categories i.e. Delta, Theta, Alpha, Beta and Gamma. Alpha/mu and Beta are used to identify motor activity in the brain. When the frequency of alpha waves is high, the brain is in a relaxed state. When someone thinks of performing any motor activity the frequency of alpha waves decreases. This decrease in frequency is called Desynchronization. As this desynchronization occurs as a result of an event therefore it is called Event Related Desynchronization (ERD). The frequency of beta waves increases by imagining any motor activity, this is called Event Related Synchronization (ERS) [3]. These values of ERS and ERD play a vital role in the classification of EEG signals. If there are no discriminant values in ERD maps then the classification becomes a troublesome task [3]. Evoked Potential (EP) is another type of brain response, which occurs as a result of internal or any external event. EP is phase-in locked to the event and ERD/ERS is not phase-in locked to the event and it's the major difference between the both [4]. EP has become the primary tool for neuroscientists when averaging of EEG signals is practiced [2]. ERDs become primary tools while dealing with MI EEG signals.

II. BRAIN RESPONSES
There are two types of brain responses, ERD/ERS and Evoked Potential (EP). ERD/ERS are frequency band-specific and not phase-in locked to the event. Subjects that have nondiscriminant ERD/ERS values are almost impossible to classify [3].
EP is another type of brain response. It is a time domain signal and phase-in locked to the event. There are two types of evoked potentials, Visual Evoked Potential (VEP) that occurs as a result of any visual stimuli. Event Related Potential 365 | P a g e www.ijacsa.thesai.org (ERP), that occurs as a result of any event. This event can be a reflex action, memory updating task, cognitive processing or motor imagery [5]. Steady State Visually Evoked Potential (SSVEP) is a good example of VEP. Motor imagery is an example of Spontaneous BCI [3].
This study focuses on data from which evoked potentials are removed. A new pipeline is proposed for classifying data after removing evoked potentials. The proposed pipeline comprises of Common Spatial Pattern (CSP) and Gaussian Process Classifier (GPC). For this particular type of data (nondiscriminant ERD/ERS comprising MI EEG signals), our proposed pipeline outperforms state of the art algorithms. According to our best knowledge, the proposed pipeline is not previously used in this kind of research. Discussed results are the outcome of the experiments conducted in this study and the observations that are found as a result of the regeneration of other researchers' studies. Because of the non-availability of codes, generated results may differ from other researchers. By confining signals and narrowing down the region of interest, the performance of classifiers can be dramatically improved. A comprehensive comparison of several pipelines is presented to show the robustness of the proposed approach.
In the coming section background study and literature review is presented. The proposed pipeline and approach are discussed in the next section. Experiments and Results are presented in the following section and paper is concluded by the last section.

III. LITERATURE REVIEW
BCI's non-usage in the real-time application is caused by poor accuracy, noise and non-stationary nature of EEG signals [3]. From the literature, it is known that for BCI based on MI EEG signals, highly depend on ERD/ERS i.e. Event Related Desynchronization and Event Related Synchronization. This occurs in alpha and beta bands of EEG signals due to motor imagery activity. Large number of studies confirms that ERD/ERS is found in mu/alpha rhyme and beta rhyme in the motor cortex region of the brain. Alpha ranges from 7 to 12 Hz and beta ranges from 13 to 30 Hz [6]. Researchers have achieved very good accuracy by using CSP as a feature extraction technique [7]. Change in movement sequence will increase mu/alpha ERD. Once new movement is learned ERD will be reduced. With the help of ERD, one can find when a person is trying to learn a new motor task. After learning, ERD will be reduced. ERS means, increase in the spectral peak for a specific frequency. An increase in the alpha band or ERS in mu band means there is no activity [4]. Visual inspection of ERD/ERS is performed to find the strongest or discriminant values [8]. Subjects in a dataset that don't comprise discriminant ERD/ERS values are considered as bad [9]. Riemannian approaches seem to meet the challenges of MI EEG classification as per the latest research. In this approach, covariance matrices are directly computed from EEG signals with the help of Riemannian geometry. It requires less data for classification which makes it robust for real-time applications. Mapping the EEG signal into a Riemannian manifold, target and non-target ERP responses could be classified directly by a non-Euclidean distance measurement. Because this method does not train a model in a high dimensional space, calibration times are significantly reduced. ERP waveform with Riemannian geometry is used with P300 signals for generating spellings of words. The author claims to reduce spelling time to be within 20 seconds [10]. On digging ancient grounds, it is found that ERP has a rich history. It is the most studied activity in EEG signals. ERP is a time-domain waveform whereas ERD/ERS is usually confined to a specific frequency. Mostly ERP is used for P300 signals and cognitive processing, to find attention. To make a robust BCI system it is important to deal with noise in EEG signals. Some authors argue that linear denoising techniques affect the salient features of EEG signals. They proposed nonlinear denoising techniques [11]. For feature extraction, it is important to capture vital signal characteristics, so it can be used to classify task-specific brain states [3]. In some BCI systems, only the most dominant features are used for classification by the classifiers [12]. Based on the classification results, the type of task is identified. Famous classification approaches used in literature are Linear Discriminant Analysis (LDA) [12] [13], Support Vector Machines (SVM) [12], k-nearest neighbors, Logistic Regression (LR) [14], Quadratic Classifiers [15], Recurrent Neural Network (RNN) [16]. Some other BCI uses feature extraction, selection, and classification as one block, in deep learning [6]. CSP + LDA, CSP + LR and CSP + SVM have been state of art algorithms for classifying motor imagery EEG signals so far [1]. According to some researchers, ERP Covariance with Riemannian geometry outperformed state-ofart algorithms [17]. Fig. 1 shows the usage of MI EEG data in the literature. Most of the times EEG raw data is used for MI EEG signals as per the literature review given in Table I. Classification pipeline (Covariance matrices + Riemannian Geometry) is followed by winners of many international competitions for several years [17] therefore gained popularity in research [18] [19]. A Riemannian Geometry algorithm Minimum Distance to Mean (MDM) is famous in classifying P300 signals as well [20]. Multiple Time Window LDA Beam former (MTWLB) was used as feature extraction technique which extracted features from ERP signals and gave accuracy of 92% [21].  In recent years, MI EEG signals were classified with Subject Specific Decision Tree (SSDT) [22], Multi Scale Filter Bank Convolutional Neural Network (MSFBCNN) [23], Sequential Backward Floating Selection (SBFS) as feature selection and Naïve Bayesian Parzen window (NBPW) used as classification method [24]. Some authors claimed that Power Spectral Density (PSD) is most effective in extracting patterns for classification MI EEG data [13]. Support Vector Machines (SVM) is very famous in EEG classification [14]. SVM with Differential Equation (DE) [12], SVM with PSD [25] showed good performance. Support Vector Machines (SVM) and K-Nearest Neighbors (KNN) are popular for classification of raw EEG signals by attaining accuracy of 99% and 98 % respectively [28]. Sparse Bayesian learning of frequency bands (SBLFB) [26], Recurrent Neural Network (RNN) with Sliding Window Cropping Strategy (SWCS) [27] were also used for MI based BCI. Quadratic Discriminant Analysis (QDA) showed outstanding performance in case of Epileptic EEG data's classification, i.e. 99% [15].

IV. METHODOLOGY
In this section proposed method will be discussed. It revolves around two points. Firstly, find classification accuracy of pipelines before and after implementing Removing Evoked Potential (REP). Secondly, the response of the proposed pipeline, Common Spatial Pattern (CSP) and Gaussian Process Classifier (GPC), in comparison with other pipelines for the classification of those MI EEG signals that have nondiscriminant ERD/ERS values.

A. Problem Statement
According to statements of famous researchers "It is impossible to distinguish between left and right foot motor imagery, or between the movements of particular fingers because the cortical areas associated with these distinct movements are too small to generate Discriminative ERD and ERS signals" [13]. Therefore it is required to study how the classification of these subjects can be improved, which have non-discriminative ERD/ERS signals. This study focuses on those subjects that have non-discriminant ERD/ERS comprising MI EEG signals by using a REP-based filter approach so classification performance can be improved.

B. Proposed Pipeline
Common Spatial pattern is one of the best feature extraction methods used for EEG signals. According to research, Gaussian Process Classifier (GPC) is the best classification algorithm. In this study two methods are combined into one pipeline and data after filtering with REP is classified with above mentioned pipeline as well as with state of art algorithms. a) Common Spatial Pattern: When humans perform some tasks or think about performing some tasks, some signals are generated in the brain. Signals generated while performing something and just imagine of doing something, are somewhat similar. Depending on the type of motor imagery signals, different EEG patterns can be measured. Raw EEG signals have information about signals and noise. It is a linear combination. For feature extraction, Common Spatial www.ijacsa.thesai.org Pattern has obtained good popularity [29]. It finds spatial filters that maximize the ratio of the variance of data of classes [30]. Spatially filtered signal can be described by (1). (1) Where S is spatially filtered signal, M is Nc x T matrix, W is L x Nc, matrix referred to CSP projection. T is for trial. To understand it in a better way CSP can be visualized as it increases the variance of one class and decreases the variance of other class by transforming axis for data. Therefore, the classes which were not identifiable earlier can be distinguished after using CSP.

b) Gaussian Process Classifier (GPC): Gaussian
Process Classifier is used to classify probabilistic classification, it supports multi-class classification by performing either one-versus-rest or one-versus-one based training and prediction. In one-versus-rest [31]. It is a nonparametric classification method and based on Bayesian methodology. It focuses on the modeling of posterior probabilities by defining a certain latent variable fi for the pattern i in case of a two-class problem. To identify whether pattern i belongs to class C1 or not, one will check if fi is positive and large then the probability of belonging pattern i to C1 is high. On the other hand, if fi is negative and large then the probability of belonging to C2 is high. If fi is close to zero then the probability of belonging to any class is ambiguous [13].

C. Proposed Approach
Evoked potentials are computed and averaged for all the trails for every subject. In this case, evoked potentials are averaged for 24 trails. The time duration for calculating is set between -1 and 4 secs. The architecture of the proposed approach is shown in Fig. 2. After computing evoked potentials, it is removed from data while applying band-pass filter. Removing evoked potential is called REP. Two parallel experiments are conducted. One without REP and other after applying REP based filter. Data is visualized to see the effect of REP. Feature extraction and classification is done in parallel. Results are computed and compared to find the performance of REP. a) REP-based Filter: Frequency filters are used to segregate different frequencies or amplify the desired signal. Frequency filters can be lowpass, highpass, bandpass and bandstop. Cut off frequency is the frequency on which filters start working. Pass filter allows only a particular frequency to pass and stop filter stops particular frequency and allows to pass all others. Bandpass filter allows a certain range of frequencies to pass. Filters are also used to remove noise from signals. Noise in EEG signals can be due to power line noise (50 Hz), eye movement (< 1 Hz), ECG noise ( approx 2 Hz), Muscle Unit Potential ( 70 -250 Hz).
Requirements of study are, segregation of alpha and beta rhymes, removing noise, removing evoked potential, enhancing low ERD/ERS values in signals. At first, frequency bands are segregated in terms of Alpha and Beta rhymes. Cut off frequency of 7 to 12 Hz is used for Alpha rhyme and 13 to 30 Hz for Beta rhyme. Evoked potentials are calculated and averaged along all the trails. EP values are removed from alpha and beta rhymes. Evoked potentials are removed during bandpass filtering operation on segregated rhymes of data with 53 db stopband attenuation. Filtering is done in 3 contiguous segments. A one-pass, zero-phase, non-causal bandpass filter is applied which has a roll of value 6 db. As roll-off value is increased, the sharpness of the filter also increases. Filter length comprises of 529 samples length for time limit 3 sec. Lower transition bandwidth of the filter is set to 1 Hz and upper transition is set to 2 Hz. During filtering evoked potentials are removed. So, data only comprises of ERD/ERS brain's response.
Data can be visualized, before removing evoked potential, from Fig. 3, different colors are showing first 14 channels of data out of 64. Bandpass filter is used to extract frequency bands between 7 to 30 Hz for processing. Resultant signals are enhanced so low ERD/ERS values can be increased. This data is further used in feature extraction and classification step by using the proposed pipeline and other state of art algorithms. The results are computed. In the next step, REP is applied during filter band selection, data after applying REP can be seen from Fig. 4 is showing MI EEG data after filtering with REP approach through bandpass filtering. It can be observed that data is now in a good format after removing evoked potentials. This data is again used in feature extraction and classification step by proposed (CSP + GPC) as well as state of the art algorithm. Results are computed for all the subjects and along all the pipelines.   c) Computing ERD/ERS: ERD/ERS is computed using python library MNE. It is a very rich library for processing brain waves. ERD/ERS maps are also visualized as shown in Fig. 7. An ERDS map is a time/frequency representation of ERD/ERS over a range of frequencies. This figure shows a discriminant ERD/ERS map. Blue color shows desynchronization and red color shows synchronization. Cluster-based permutation tests are used for finding significant ERDS values.

d) Computing Common Spatial Patterns:
First four components of Common Spatial patterns are computed. CSP is also computed before applying CSP and after applying CSP. All the coding is done in python 3, using the MNE library in anaconda virtual environment. CSP components before applying REP and after applying REP can be seen from Fig. 8 and Fig. 9. After computing CSP components various classifiers are applied. Features are also extracted by using other famous feature extraction method i.e. Xdawn. Several classification algorithms are used for evaluating results on a sound basis. Comparison between the best 7 pipelines is demonstrated in the results section

V. RESULTS AND DISCUSSIONS
As the main focus of this study is classifying subjects that have low ERD/ERs values. So, in this section, a comparison of classification performance is presented, between the famous seven pipelines for 9 subjects. Results show there is an improvement in the performance of all the classifiers and all the subjects. The performance metric used is ROC-AUC. That is a famous performance metric and used in lots of research studies. a) Datasets: Data is taken from an online data resource, physioNet 1 . Dataset was recorded from 64-channels EEG using the BCI2000 system. 14 runs of experiments were performed by each subject. Two one-minute baseline runs www.ijacsa.thesai.org (one with eyes open, one with eyes closed), and three twominute runs of each of the four following tasks as shown in Table II. There are in total 14 runs of experiments performed by each subject. Data is in EDF+ format. It contains 64 channels for each signal and sampled at 160 samples per sec. each subject performed 46.62 ± 0.96 trials for the left-and righthand motor imagery tasks. The average numbers of trials were 23.62 ± 0.61 and 23.00 ± 0.62 for the left-and right-hand motor imagery data respectively. The EEG data is sampled at 160 Hz for all subjects yielding 640 samples for every single trial.
b) Experiments: All the experiments are done by using the intel core i7 processor having 8 GB RAM and 64-bit operating system. Coding is done using python 3, in anaconda platform. A virtual environment is set by importing all the libraries in it. Namely mne, sklearn, matplotlib, numpy and pyriemann. Dataset is taken from physioNet, an online data recourse. Data is taken only for the required runs, that are associated with motor imagery tasks.
The performance of the proposed pipeline is evaluated by using two types of datasets, one without using REP approach and other after applying REP. Same course is repeated for other pipelines including state of art algorithms. Experiments are conducted and visualized by using all the above libraries in jupyter notebook.
Here are actual screenshots of results from code for comparing results before applying REP and after applying REP from Fig. 10 -Fig 18. Classification pipelines that are used in this study are, Vectorizer with Gaussian Process Classifier (Vect + GPC), Common Spatial Pattern with Gaussian Process Classifier (CSP + GPC), Common Spatial Pattern with Support Vector machines (CSP + SVM, State of art algorithm), Common Spatial Pattern with Quadratic Discriminant Analysis (CSP + QDA, State of art algorithm), Common Spatial pattern with Logistic Regression (CSP + LR, State of art algorithm) and XDawn with GPC. The Second Dataset is taken from Github. Data is acquired from 32 channel electrodes, there are in total of 34 columns and 3469302 rows. There are 3 event types. Each sample will run for 1300 ms Data is preprocessed to remove Null values. After that REP based filter is applied. The results of both datasets are given in the following section. c) Results: This section shows the results of various pipelines for every subject, before and after applying REP. Table III is showing the classification accuracies of all the pipelines used. It can be observed that the performance of all pipelines is improved. Fig. 10 to Fig. 18 shows classification performance of pipelines before applying REP and after using REP. The performance of pipelines for each subject is demonstrated separately, to show the precision of results. Fig. 20 is showing that the performance of all the pipelines is improved by using REP. Vect + GPC is showing the maximum increase in performance. Classification performance is improved significantly by all the pipelines except Xdawn + GPC. The performance of CSP + QDA for subject 7 improved remarkably. The focus of this study is upon improving the classification of subjects having low-ERD/ERS values. Fig. 19 shows the classification performance of all the subjects has increased after applying REP. The Minimum increase in performance metric is 4% and the maximum increase is 14%. An increase in the performance of classifiers makes a system accurate. Mean accuracies of pipelines before and after application of REP is given in Table III. Table II demonstrates that the classification accuracy of all the pipelines which are used in the experiment also increased. The graphical representation of this table is shown in Fig. 20. To be more specific, the percentage increase in pipelines can be seen by Fig. 21. The minimum increase is 1% and the maximum increase is 20%. From the above results, it is obvious that REP is a robust approach and can be used for increasing the performance of state of the art algorithms. The results of the second dataset are as shown in Table IV and Fig. 22. Table IV shows the results of the second dataset of only one pipeline, i.e. CSP + GPC. The graphical representation of results is shown in Fig. 22. To prove the robustness of the proposed method one more filter "Infinite Impulse Response (IIR)" is also applied to MI EEG data. Given are the results of three filters, namely, Finite Impulse Response (FIR), Infinite Impulse Response (IIR) and Removed Evoked Potential (REP). Results (by using three filters) of one subject are demonstrated by Fig. 23. The mean values for all the subjects are shown in Fig. 24.     (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 1, 2020 373 | P a g e www.ijacsa.thesai.org   For showing the robustness of the proposed approach, the results of REP are compared with two other filters. Fig. 24 is showing mean accuracies of all the pipelines used in this study. d) Discussion: In datasets, some subjects did MI tasks with ease, while some others faced difficulty. This affects the results of the classification in the case of MI EEG signals. Before applying REP the classification accuracy of all subjects, by most of the pipelines, was not satisfactory. After using REP in filter band selection, the performance of all classifiers improved. Some pipelines performed better in the case of one subject whereas others performed well for other subjects, but in most cases, their AUC value was approximately equal to 0.50. REP approach improved performance by increasing AUC value to around 0.70. Less than 0.50 shows classifier is performing reversely, that is saying label 0 as 1 and label 1 as 0. AUC value equals 0.50 means classifiers are unable to detect a class of data. AUC value around 0.70 means classifiers is performing well. Similarly, AUC value around 0.90 means the classifier is performing excellently.
For subject 1, CSP + LR got AUC value 0.42± 0.10 before applying REP and 0.63±0.10 after applying REP. For subject 2, CSP + QDA got AUC value 0.42 ± 0.10 before applying REP and 0.69 ± 0.05 after applying REP. For subject 3, CSP + LDA attained AUC value 0.46 ± 0.11 before applying REP and 0.69 ± 0.07 after REP. It gained maximum increases among all pipelines for subject 3, i.e. 0. 23  For subject 6, CSP + QDA got AUC value 0.32 ± 0.10 before applying REP and 0.62 ± 0.16 after applying REP. They gained maximum increases among all pipelines, i.e. 0.30. Auc value of Xdawn + GPC decreased instead of increasing, i.e. it went down from 0.46 ± 0.10 to 0.40 ± 0.10. Subject 7 has these results; CSP + SVC got AUC value 0.48 ± 0.04 before applying REP and 0.68 ± 0.07 after applying REP. They gained maximum increases among all pipelines, i.e. 0.20. Subject 8 results' are, CSP + QDA got AUC value 0.30 ± 0.1 before applying REP and 0.55 ± 0.07 after applying REP. They gained maximum increases among all pipelines, i.e. 0.25. Subject 9 has these values, Vect + GPC has AUC value 0.51 ± 0.09 before applying REP and 0.68 ± 0.05 after applying REP. They gained maximum increases among all pipelines for Subject 9, i.e. 0.17.
The proposed approach increased the performance of classifiers for low ERD/ERS subjects from null to good. Fig. 19 is showing there is an improvement in the classification of every subject. Three experiments are conducted in parallel. In the first one, the classification accuracy of MI EEG signals is found by using a FIR filter. In the second one, the classification accuracy of MI EEG signals is observed by using an IIR filter. In the third one, a REPbased filter is used. Their results are compared as sown in Fig. 10 to Fig. 24. It is found the performance of most of the classifiers improved. Some classification pipelines didn't show any significant improvement i.e. Xdawn comprising pipelines (because it deals with evoked potentials). Therefore on removing evoked potentials from MI EEG data, its classification accuracy decreased in some cases, i.e. Fig. 14 and Fig. 15. In most cases, the performance of the Xdawn comprising pipeline remained the same before and after applying REP. All the pipelines that used CSP as a feature extraction technique were affected by the REP approach in terms of an increase in performance. It shows the performance of CSP comprising pipelines improved by REP.

VI. CONCLUSION
This paper proposes an efficient REP based filter approach for the classification of MI EEG signals. The proposed method employs a REP based filter approach with CSP as a feature extraction technique and GPC as a classification method. In the proposed method REP based filter is applied on MI EEG signals to remove evoked potential. The remaining signal comprises only one response i.e. ERD/ERS. Proposed Pipeline (CSP + GCP) and various other the state of the art algorithms are applied on this REP based filtered data as well as on data where REP based approach not used. Results of comparison show a clear improvement in classification accuracy of state of the art algorithms as well as in proposed one i.e. up to 20%. Results of the second data set are also showing improvement after the application of REP based filter. As future work REP based approach will be applied on a self-acquired MI EEG dataset to implement it in the real-time scenario.