Keywords

1 Introduction

Epilepsy has become the third most common neurological disorder after stroke and dementia. According to the World Health Organization (WHO), epilepsy affects 0.5–1.5% of the world population, mainly children under 10 and people over 65, and it is more common in developing countries and disadvantaged socioeconomic classes [2]. The seizures are the hallmark for an epilepsy diagnosis. They are recurrent but infrequently and unprovoked signals caused by the synchronized electrical discharge of a large number of neurons [9]. Since epilepsy occurs when the localized electrical activity of neurons suffers from an imbalance, analyzing the electroencephalographic signals (EEG) is one of the most suitable methods to diagnosis this disorder.

Most of the computer-aided systems for diagnosis epilepsy use EEG because it allows rapid and visual inspection of seizures, not only when they are occurring, but also the pre-occurrence- and between- seizures [12]. The common procedure for developing automatic diagnostic-assistance systems based on EEG has five stages (citation): EEG signal acquisition, pre-processing, signal characterization, classification and in-context interpretation (visualization). Zhou and colleagues [13] developed an epileptic seizure detection using the raw EEG Signals (temporal approach), meanwhile, Tsipouras [10] studies the epilepsy classification using spectral information of EEG signals.

This work aims to contribute with an exploratory study about the feature extraction and classification techniques on seizure detection. The proposed framework includes the typical stages described above as follows: a simple amplitude normalization for pre-processing signals. Subsequently, features are extracted using statistical measures on both the original signals and spectral transformation thereof (Discrete Wavelet Transformation, DWT). Afterward, a set of features is chosen by applying feature selection methods such as Bestfirst and Ranker. Then, the selected features are classified by using four of the most representative classification approaches for EEG: Linear Discriminant Analysis (LDA), Quadratic Discriminant Analysis (QDA), K-Nearest Neighbor (KNN) and Support Vector Machine (SVM). The framework uses the “Epileptic Seizure Recognition Data Set”Footnote 1 for running several tests in order to explore as much as possible the proposed classifiers and features. The outcome of the study points out the DWT features and SVM classifier as the most suitable combination.

2 Materials and Methods

2.1 Dataset

The “Epileptic Seizure Recognition Data Set” is composed of 500 individuals with 4097 data points of 23.6 seconds each one. This dataset is later divided and shuffled every 4097 data points into 23 chunks which contain 178 data points for 1-second [8]. Therefore, it contains a matrix of dimension \(11500 \times 178\). The last column represents the labels (1,2,3,4,5) as follows:

  1. 1.

    Seizure activity

  2. 2.

    EEG signal from the area where the tumor is

  3. 3.

    EEG activity from the healthy brain area

  4. 4.

    EEG signal from eyes closed

  5. 5.

    EEG signal from eyes open.

2.2 EEG Pipeline

Pre-processing: The signals are normalized in order to remove offset levels using the Eq. 1.

$$\begin{aligned} S = \frac{S- \bar{S}}{max \left| S \right| } \end{aligned}$$
(1)

where S is the signal, \(max \left| S \right| \) is the maximum absolute value of the signal, and \(\bar{S}\) is the mean of the signal.

Signal Decomposition: Discrete Wavelet Transform (DWT) decomposes a signal recurrently into two sub-signals (approach and detail) with less resolution regarding the frequency, known as coefficients [6]. Daubechies family is used in this work (order four) through the MATLAB function wavedec.

Characterization: Considering previous works of EEG signal [1, 11], several features are used as follows:

Number

Type

Description

\(x^{(1)} \cdots x^{(15)}\)

Temporal

Statistical features

Entropy

\( x^{(16)} \cdots x^{(27)}\)

Morphological

Area under the curve

Amplitude change

Energy

\(x^{(28)} \cdots x^{(35)} \)

Spectral

Fourier transform

(Best features)

\(x^{(36)} \cdots x^{(221)}\)

Representative

DWT

(Temporal and morphological features)

This results in a feature matrix of dimension \(11500 \times 221\). Where 221 is the total number of features normalized through the Eq. 1.

Feature Selection: In order to use the most significant features, two methods from Weka [5] are used to create a smaller subset:

  1. (i)

    Using the CfsSubsetEval as attribute evaluator and BestFirst as search method [4]. This is applied to the whole feature matrix.

  2. (ii)

    Using the InfoGainAttributeEval as attribute evaluator and Ranker as search method. This is applied to the outcome of the previous step.

Obtaining thus a final feature matrix of size \(11500 \times 9\). Where 9 is the total number of features used in this work. Most of the features coming from the DWT subset.

2.3 Classification

These features are used to train and evaluate four different classifiers. In this sense, a representative method of each typology (Distance-based (k-NN), model-based (LDA, QDA) and SVM (data-driven)) are used [3, 7]:

  • Linear Discriminant Analysis (LDA): LDA creates a hyperplane by the projection of the co-variance matrices that separates the classes and estimates the probability that a new data belongs to each class (maximum probability).

  • Quadratic Discriminant Analysis (QDA): It is a variant of LDA, where an individual co-variance matrix is estimated for every class of observations.

  • K-Nearest Neighbour (k-NN): k-NN assigns the classification label following the largest posterior probability among to nearest neighbor’s values, which is calculated using a metric distance.

  • Support Vector Machine (SVM): SVM finds the optimal hyperplane (in a N-dimensional space) that separates the data by maximizing the margin between the classes.

For all the experiments (see the next section), the classifiers were trained with 10 iterations using 80% of the data and the rest for testing. All experiments were run in Matlab using the classifier settings shown in Table 1. Finally, Fig. 1 summarizes graphically the methodology used in this research.

Table 1. Classifiers settings
Fig. 1.
figure 1

Block diagram of the proposed methodology.

3 Results and Discussion

This work uses the Dunn test (Kruskal-Wallis with bonferroni correction) for performing comparisons among the classifiers. In order to evaluate as much as possible the performance of the classifiers, the final matrix with the selected features is used for doing five tests. All experiments are performed regarding the target class 1 which is the most important class for this research (seizure activity). Additionally, for evaluating the capacity of the methodology, the five classes of the original dataset were restructured to work with binary and three-class cases instead of multiclass cases (more complex and challenging). The combination of classes are described as follows:

3.1 Experiment 1

In this experiment the classes 2, 3, 4 and 5 are merged into a single class, with class 1 as target for classification. As result, there are significant differences (chi-squared = 30.8512, df = 3) among both LDA and QDA with KNN and SVM. SVM achieves the lowest error rate followed nearly by kNN. Figure 2 shows the result.

Fig. 2.
figure 2

Experiment 1 - Comparison of classifiers. Significant difference p-value \(*<=0.05, **<=0.001, ***<=0.0001.\)

3.2 Experiment 2

For this experiment, we tried to classify the region where the seizure is presented; therefore, the seizure (class 1) and tumor localization (class 2) are used alone, and the rest of the classes are removed from the dataset. We found that LDA is significant different with SVM, meanwhile QDA is with both SVM and KNN (chi-squared = 34.929, df = 3). SVM presents again the lower error rate followed nearly by KNN. The worst of them is QDC. Figure 3 shows the result.

Fig. 3.
figure 3

Experiment 2 - Comparison of classifiers. Significant difference p-value \(*<=0.05, **<=0.001, ***<=0.0001.\)

3.3 Experiment 3

Here, we intended to distinguished the seizure activity and the area where the tumor localization is, so the classes 1 and 2 form two classes individually, and the rest of the classes as a single one. This experiment presents the similar results as the previous one, that is, QDA as the worst classifier with a significant difference with both SVM and KNN, meanwhile LDA only with SVM. SVM achieves again the lowest error rate. Figure 4 shows the result.

Fig. 4.
figure 4

Experiment 3 - Comparison of classifiers. Significant difference p-value \(*<=0.05, **<=0.001, ***<=0.0001.\)

Fig. 5.
figure 5

Experiment 4 - Comparison of classifiers. Significant difference p-value \(*<=0.05, **<=0.001, ***<=0.0001.\)

Fig. 6.
figure 6

Experiment 5 - Comparison of classifiers. Significant difference p-value \(*<=0.05, **<=0.001, ***<=0.0001.\)

Fig. 7.
figure 7

Comparison of classifiers throughout their accuracies.

3.4 Experiment 4

In this opportunity the classes 1, 2 and 3 represent different classes individually, with the rest of classes removed from the dataset. Therefore, class 3 can distinguish the healthy brain area. The results suggest that SVM achieves the lowest error rate and significantly differs with the other classifiers (chi-squared = 31.7648, df = 3). Meanwhile, QDA obtains the higher error rate. Figure 5 shows the result.

3.5 Experiment 5

Continuing with the multiclass problem, the classes 1 and 2 were merged as a single class, meanwhile class 3 individually and classes 4 and 5 as a single one as well. The results present again SVM as the best classifiers. There are significant differences between LDA and SVM, and QDA with both SVM and KNN. Again the worst one is QDA. Figure 6 shows the result.

Finally, Fig. 7 presents the comparison among classifiers along the five experiments, evidencing the SVM’s behavior as the best classifier.

4 Conclusions and Future Work

The comparison of the explored techniques suggests that the features from DWT decomposition along with Support Vector Machine are the best alternatives to build an Epilepsy-driven EEG analysis computer-aided system. The aim of combining several classes is to study the performance of classifiers, demonstrating that for binary classification both KNN and SVM are good alternatives, meanwhile, for the three-class problem, QDA shows the worst performance and SVM the best. Indeed, the seizure data are hardly separable classes, therefore, a data-driven method like SVM with kernel solution was necessary. Other alternatives should be considered for future studies, among them the feature extraction and deep learning approaches. Besides, given the number of methods (dozens of methods), it is necessary to scale the study with more performance measures to be able to do a comparison with other studies.