## 2 Materials and Methods
### Methodology
#### 2.2.2 Feature Extraction  
Nine signal complexity measures were derived from the pre-processed EEG: multi-permutation entropy (4 levels), sample entropy, wavelet entropies, logarithmic entropy, Shannon entropy, and spectral entropy. The permutation entropy is a complexity measure with a low computational cost for time series based on comparing neighboring values using the distribution of order patterns [16]. The sample entropy quantifies the regularity in the EEG signal regardless of its length [14]. The discrete wavelet transform is used to compute the wavelet entropies [5], whereas the wavelet packet decomposition is used to compute log energy entropy and Shannon entropy to measure the degree of uncertainty in the signal and to evaluate the dynamical order of the signal [4]. The spectral entropy is calculated using the normalized power spectral distribution of the EEG signal [14]. For the frequency domain analysis, we performed the Welch method, which takes an average of the periodograms obtained using fast Fourier transform (FFT). We calculated the absolute power density and relative power density within each of the five frequency sub-bands--delta (1-4 Hz), theta (4-8 Hz), alpha (8-14 Hz), beta (13-30 Hz), and gamma (30-70 Hz)--to increase the feature vector size to 19 per channel. The absolute power of a band can be calculated as the sum of  
Figure 2: A block diagram of this study’s automatic seizure detection method. A total of 19 pruned EEG channels from the TUSZ corpus are resampled, filtered, re-referenced, and segmented. Features are subsequently extracted and used as input for modelling and testing four classifiers separately (RF, GB, k-NN, and SVM).  
all of its power values in that frequency range, whereas the relative power (RP) index for each band was determined based on the absolute power in each frequency band, expressed as a percentage of the absolute power (AP) totaled across all frequency bands. Both absolute and relative PSD analysis are essential for achieving accurate brain analysis. Feature values were averaged using a scalar method before serving as input to the classifier. To investigate whether a subset of the extracted features had a greater significance compared to the entire set, we subdivided the features based on their category: frequency domain and information theory (see Table 2). A univariate feature selection method based on the one-way ANOVA test was also applied for comparison to investigate the effect of reducing the vector size. We evaluated the statistical difference of each feature between the two classes: seizure and seizure-free. In order to identify highly significant features, we sorted features based on their \(p\)-values, which correspond to the probability of the results being observed if the null hypothesis H0 is true. In this work, the null hypothesis H0 implies that there is no difference between the means of two groups (seizure and seizure-free records). In general, the lower the \(p\)-value, the higher the reliability of results. In medical applications, 0.05, 0.01, or 0.001 are often the recommended threshold values. The features' level of significance was implemented using Python (3.8.0), specifically the Sklearn library.