**2. Classification of epileptic EEG signals**

In this study, three different approaches are presented to distinguish seizure and seizure-free EEG segments. In the first method, various temporal, spectral, and non-linear features are extracted from the IMFs obtained using EMD and EEMD approaches. In the second method we present, epileptic EEG segments are analyzed using a simple matrix decomposition method, namely the DMD approach. Finally, in the third approach the SST method with high TF resolution is utilized to extract features and achieve high classification performance in distinguishing seizure and seizure-free EEG segments. The results of these three approaches are compared in line with the classification performances of various machine learning algorithms used in our study.

#### **2.1 Data set (IKCU EEG data set)**

In our study, EEG data recorded using the Neurofax EEG device from 16 different epilepsy patients (5 Female; 11 Male, the average age is 37.3∓7) in the Department of Neurology, Faculty of Medicine, İzmir Katip Celebi University are used. These EEG recordings are collected with a sampling frequency of 100 Hz using surface electrodes from 18 different EEG channels (Fp1-F7, F7-T1, T1-T3, T3-T5, T5-O1, Fp1-F3, F3-C3, C3-P3, P3-O1, Fp2-F8, F8-T2, T2-T4, T4-T6, T6-O2, Fp2- F4 F4-C4, C4-P4, P4-O2). It was informed by expert neurologists that the attacks in the used EEG data set are Frontal and Temporal lobes focused. Hence, 10 EEG channels (Fp1-F7, F7-T1, T1-T3, T3-T5, Fp1-F3, Fp2-F8, F8-T2, T2-T4, T4-T6, Fp2- F4) with a predominance of temporal and frontal lobes are used in our study. These EEG data are used in our study by obtaining the Ethical Approval of İzmir Katip Çelebi University Non-Invasive Clinical Research Ethics Committee dated 08.08.2019 and numbered 296.

#### **2.2 Empirical mode decomposition and its variant**

EMD approach in which signals decomposed into Intrinsic Mode Functions (IMF) with zero-mean oscillations, is the adaptive time-frequency analysis method for the non-linear and non-stationary processes. The sum of these obtained IMFs must be equal to the original signal [22, 24].

$$\mathbf{x}[n] = \left(\sum\_{l=1}^{L} IMF\_l[n]\right) + R\_L[n] \tag{1}$$

where *x n*½ � is the original analyzed signal, L denotes the number of IMFs and *RL*½ � *n* indicates the residue.

Despite the successful results of the traditional EMD approach to analyze the non-stationary process, the problem named "mode mixing" is encountered where similar oscillations occur in different modes or different oscillations are observed in the same mode. In the EEMD method, by adding Gaussian white noise to the analyzed signal, the continuity of the signal in different frequency regions is ensured, and the mode mixing problem has been tried to be overcome. Then, the noisy signals obtained by adding white noises with different statistical properties were decomposed into IMFs by the EMD method. As a result of the EEMD method, the average IMFs value is obtained by taking the average of the IMFs group obtained as much as the number of white noise added [25].

$$\mathbf{x}^{i}[n] = \mathbf{x}[n] + \mathbf{g}^{i}[n], \qquad i = \mathbf{1}, \mathbf{2}, \dots, \mathbf{K}. \tag{2}$$

Here, ensemble number is denoted by K value, *g<sup>i</sup>* ½ � *n* is indicates the added Gaussian noise at *i th* iteration.

By using EMD approach, IMFs (*IMF<sup>i</sup> j* ½ � *n* , *j* ¼ 1, … , *J i* ) of noisy signal *x<sup>i</sup>* ½ � *n* is obtained for the *i th* iteration. IMFs are calculated for the EEMD approach by taking the average of the IMFs obtained after the number of ensembles (K) iterations.

$$\overline{IMF\_j[n]} = \frac{1}{K} \sum\_{i=1}^{K} IMF\_j^i[n] \tag{3}$$

The first 3 IMFs obtained for an example pre-seizure and seizure EEG segments using EMD and EEMD methods are shown in **Figure 1**.

In our proposed EMD and EEMD based approach, IMFs of pre-seizure and seizure EEG segments are obtained. Following, the IMF selection process is performed using energy-based, correlation-based, power spectral density-distance based and statistical p-value based metrics, as described in [8]. Time (Energy, Mean value, Skewness, and Kurtosis values) [6, 7], spectral (Total power, Spectral Entropy, 1st, 2nd, and 3rd spectral moments) [9], and non-linear (Hurst Exponent and Higuchi Fractal Dimension) [3, 12] features are calculated using 3 highly voted

**Figure 1.**

*Pre-seizure EEG signal and it's first three IMF obtained using (a) EMD, and (c) EEMD approaches; seizure EEG signal and it's first three IMF obtained using (b) EMD and (d) EEMD approaches.*

IMFs (IMF1, IMF3, and IMF2) determined in the IMF selection process [8]. Thus, 4 time domain, 5 spectral, and 2 non-linear features are calculated for each preseizure and seizure EEG segment. For comparison, the same features are calculated from the EEG segment itself, without using the EMD or EEMD method. In addition, the same features are calculated from the sub-bands of the DWT approach, which is a conventional analysis method and compared with the results of the EMD and EEMD approach. In our experiments, Daubechies4 (db4) mother wavelet and 3 level subband decomposition are used [7, 33].
