Evaluation of Window Size in Classification of Epileptic Short-Term EEG Signals Using a Brain Computer Interface Software

The complexity of epilepsy created a fertile ground for further research in automated methods, attempting to help the epileptologists’ task. Over the past years, great breakthroughs have emerged in computer-aided analysis. Furthermore, the advent of Brain Computer Interface (BCI) systems has facilitated significantly the automated seizure analysis. In this study, an evaluation of the window size in automated seizure detection is proposed. The EEG signals from the University of Bonn was employed and segmented into 24 epochs of different window lengths with 50% overlap each time. Statistical and spectral features were extracted in the OpenViBE scenario and were used to train four different classifiers. Results in terms of accuracy were above 80% for the Decision Tree classifier. Also, results indicated that different window sizes provide small variations in classification accuracy. Keywords-epilepsy; EEG; seizure detection; window size; brain computer interface


INTRODUCTION
Epilepsy is a devastating brain disorder followed by seizures, which are repetitive episodes of temporary interruption or disturbance of communication between neurons.Many people experience seizures without a clear cause and almost one-third of the epileptic patients suffer from refractory seizures [1].The latest facts render epilepsy a life-threatening disorder and a major factor responsible for mortality in developed and developing countries [2].Depending on the brain areas that participate during epileptic activity, seizures are divided into two fundamental types: partial (affects only a single brain area) and generalized (affects more than one region).These two main types are subdivided forming a bigger list of several seizure types [3].The Electroencephalogram (EEG) is used to monitor and diagnose epilepsy.The brain activity is monitored through the EEG which is usually performed in a well-equipped hospital.The electrodes are either attached to the surface of the skull (scalp EEG -sEEG) or placed invasively inside the brain (intracranial EEG -iEEG).Furthermore, the EEG recording is usually performed after a seizure episode and before the next seizure occurrence (interictal period).Rarely an EEG recording captures the seizure onset (ictal period) and it usually happens in a 24-hour monitoring.The complexity of EEG recordings and the huge amount of data, led to the development of methods for detecting different patterns of brain activity [4] and automated seizure analysis [5].Generally, these methods follow a pattern recognition approach, which contains feature extraction and classification.The signal is usually decomposed in epochs of specific duration in an attempt to better capture the transient occurrences of the EEG.Several time-frequency analysis methods have been proposed such as Discrete Wavelet Transform [6-8], Wigner-Ville distribution [9], Empirical Mode Decomposition [10][11] etc. Significant features are extracted from the decomposed signal and are then used to train a classifier.Usually, the raw signal is initially analyzed in epochs of small duration and the window size is of primary importance in automated seizure detection.
Recent breakthroughs in computer-aided analysis initiated the development of Brain Computer Interface (BCI) systems, which are more user-friendly and provide direct communication with the user's brain in real-time without any possible movement [12]    the spectrum amplitude (the power of the signal) in alpha band (8-12Hz),  the spectrum amplitude in beta band (12-25Hz),  the spectrum amplitude in theta band (4-8Hz),  the spectrum amplitude in delta band (1-4Hz), The resulting feature set was used to train four well-known classifiers, being Naïve Bayes, Multilayer Perceptron, Support Vector Machines and Decision Tree.

D. Classification
To evaluate the proposed method and the window size in classification results, four of the most sophisticated supervised classifiers were used.

1) Naïve Bayes (NB)
Naïve Bayes (NB) is a simple classifier that combines a probability model with a decision rule.The classifier operates on the simplest assumption that the features are conditionally independent and is based on Bayes decision theory, wherein the posterior probability of each class is calculated by the likelihood and the prior probability [15].The ultimate goal of the classifier is to minimize the probability of classification error and maximize the posterior probability.A small number of training data is needed for the classifier to estimate the necessary classification parameters and in conjunction with the less time complexity, this simple classifier has preferred in complex classification problems.

2) MultiLayer Perceptron (MLP)
The Multilayer Perceptron (MLP) classifier is a neural network with at least three layers of nodes.MLP utilizes the backpropagation techniques for training and maps non-linear input data into a space, where it becomes linearly separable.In order to train a MLP classifier and perform correct pattern classification, the connection weights after each processing of data are adjusted, based on the comparison between the error in the output and the expected result [15].

3) Support Vector Machines (SVM)
Support Vector Machines is a machine learning technique for linear and non-linear classification problems.The nonlinear input data is projected into a high-dimension feature space in order to be linearly separated.This projection is performed by the kernel function, which can be either a linear or a polynomial function, the radial basis function or the sigmoid kernels.The gap that separates the data is called hyperplane and the major goal of the algorithm is to find the optimal separating hyperplane that maximizes the distance between the data and minimizes the classification error [15].In our experiments, the radial basis function was used.

4) Decision Tree (DT)
A Decision Tree (DT) classifier is a straightforward classifier based on a series of decision rules.The root node of the tree is displayed at the top and is successively connected with other nodes through links or branches, until no further links to other nodes exist (leaf nodes).According to the DT classifier, only one link can be followed each time and the subsequent node becomes the root node of the next sub-tree.The procedure is repeated until a leaf node is reached, leading to no further decision and the category label is read [15].

III. RESULTS AND DISCUSSION
The four classifiers were trained and tested according to the 10-fold cross-validation technique.To evaluate the classification results of the experiments and thus, the window size the accuracy was calculated from the correctly classified instances: The obtained statistical results of the 24 experiments for each classifier are presented in Table II.The best classifier for epochs of 1 second with 0.5 seconds overlap, is DT with 85.95% followed by MLP with 72.41%, SVM with 67.51% and NB with 59.11%.For epochs lasting 2 seconds with 1 second overlap, the best classifier is DT with 79.06%, followed by MLP (75.56%) and SVM (70.35%) and the worst classifier is NB with 63.67% accuracy.For windows of 3 seconds with 1.5 seconds overlap and 4 seconds with 2 seconds overlap, DT remains the best classifier (82.05% and 83.50% respectively) and the lowest accuracy (66.37% and 67.47% respectively) is obtained with NB as well.For the next 12 window sizes the DT outperforms (ranging from 82.71% to 85.48%) and the lowest values (ranging from 63.63% to 70%) are obtained with SVM.At the same time, MLP indicates accuracy ranging from 77.75% to 83.35%, whereas NB shows lower accuracy, ranging from 68.97% to 75.61%, and in some cases perform almost the same with SVM (for windows of 5sec and 6sec duration).For the next 4 window sizes the DT and the MLP presents almost the same accuracy and none of the two classifiers is considerably better than the other.Accuracy for NB is about 75% for these four window sizes and SVM does not exceed 68%.Finally, for the last four window sizes, DT is the best classifier (ranging from 81.23% to 85.63%) followed by MLP (ranging from 82.04% to 83%), NB (ranging from 75.57% to 81.23%) and SVM (ranging from 67.62% to 68.87%).The smooth and small changes of the obtained results for each classifier and the comparison between their performances are depicted in Figure 3. From Figure 3 it can be observed that while the window size is increasing, the classification results for NB, MLP and DT are slightly higher, without great variations (in most cases not greater that 3%).The lowest accuracy for NB and MLP is 59.11% and 72.41% and the highest 81.23% and 83.53%, respectively; however, despite the big difference between the lowest and highest values, the intermediate values range from 1% to 3%.The best classification accuracy is provided with DT with lowest value 79.06% (2 seconds window with 1 second overlap) and highest 85.63% (24 seconds with 12 seconds overlap) whereas SVM showed the worst classification accuracy (lowest value 63.63% and highest 70.46%).Also, the best accuracy for DT, MLP and NB (above 80%) is obtained for windows of 21 seconds with 10.5 seconds overlap, whereas the SVM seemed to be the weakest classifier compared to the others.
The epoch duration has also been a focus point for several researchers.Recently [16], a method based on dynamic principal component analysis (DPCA) and energy was proposed.The authors evaluated four window sizes of the EEG segments, being 64, 128, 256 and 512 samples per window (approximately 0.37, 0.74, 1.47 and 2.95 seconds respectively).Results showed minor increase when signals were segmented in 512 samples epochs per window.In [17], authors conducted 4 experiments to find the optimal window size between 4 options.In the presented method the Permutation Entropy was calculated from nonoverlapping epochs of 0.25, 0.5, 0.75 and 1 second and was used to train a SVM classifier.Results in terms of F1 score showed small deviation (about 5% for overall F1 score).An extension of the above mentioned approach was presented in [18] wherein the same group of authors investigated among other, whether the overlapping plays significant role in seizure detection or not and they proposed a method based on Weighted Permutation Entropy (WPE).In this approach, 200 signals of the Bonn database were employed and segmented in epochs of approximately 0.35 seconds duration with overlap (OV) (128 samples per window) and without overlap (NOV) (164 samples per window).The method was evaluated on SVM and Artificial Neural Network (ANN) classifier and results indicated that epochs with 50% overlap provided slightly higher accuracy (2.25% overall accuracy for SVM and ANN).In our experiments, 24 window sizes are evaluated and the classification accuracy slightly arises as the window size increases for all classifiers.The best classifier is DT with accuracy ranging from 79.06% to 85.95%, followed by MLP ranging from 72.41% to 83.53%, SVM from 67.51% to 70.46% and NB from 59.11% to 75.61%.A comparison table is presented in Table III.

y & Applied Sci Tzimourta et al.
. In this work, a method for seizure

etasr.com Tzimourta et al.: Evaluation of Window Size in Classification of Epileptic Short-Term EEG Signals Using …
C. Feature ExtractionA set of 8 features was extracted in each epoch, forming the feature vector that used in the classification.The plugins "Univariate Statistics" and "Spectral Analysis" were employed in the OpenViBE scenario to compute four time-based features namely: "F" EEG segment DATABASE ct's state www.

TABLE III .
COMPARISON TABLE