key: cord-0023818-zy9d4sht authors: Malekzadeh, Anis; Zare, Assef; Yaghoobi, Mahdi; Kobravi, Hamid-Reza; Alizadehsani, Roohallah title: Epileptic Seizures Detection in EEG Signals Using Fusion Handcrafted and Deep Learning Features date: 2021-11-19 journal: Sensors (Basel) DOI: 10.3390/s21227710 sha: 8d9d3af8c05e600a0590dfde6025434598114c0e doc_id: 23818 cord_uid: zy9d4sht Epilepsy is a brain disorder disease that affects people’s quality of life. Electroencephalography (EEG) signals are used to diagnose epileptic seizures. This paper provides a computer-aided diagnosis system (CADS) for the automatic diagnosis of epileptic seizures in EEG signals. The proposed method consists of three steps, including preprocessing, feature extraction, and classification. In order to perform the simulations, the Bonn and Freiburg datasets are used. Firstly, we used a band-pass filter with 0.5–40 Hz cut-off frequency for removal artifacts of the EEG datasets. Tunable-Q Wavelet Transform (TQWT) is used for EEG signal decomposition. In the second step, various linear and nonlinear features are extracted from TQWT sub-bands. In this step, various statistical, frequency, and nonlinear features are extracted from the sub-bands. The nonlinear features used are based on fractal dimensions (FDs) and entropy theories. In the classification step, different approaches based on conventional machine learning (ML) and deep learning (DL) are discussed. In this step, a CNN–RNN-based DL method with the number of layers proposed is applied. The extracted features have been fed to the input of the proposed CNN–RNN model, and satisfactory results have been reported. In the classification step, the K-fold cross-validation with k = 10 is employed to demonstrate the effectiveness of the proposed CNN–RNN classification procedure. The results revealed that the proposed CNN–RNN method for Bonn and Freiburg datasets achieved an accuracy of 99.71% and 99.13%, respectively. Epilepsy is a noncontagious disease and one of the most prominent brain disorders. About 1% of the world's population has been diagnosed with epilepsy [1] . Patients with epileptic seizures suffer from some temporary electric disorders [1] [2] [3] . About 20-30 percent of the patients diagnosed with epilepsy experience one or more strokes in a month [4] [5] [6] . In the epileptic seizures period, physical damages might even cause the death of the patient. The patients also suffer from lack of a good social position and experience some severe mental disorders [4] [5] [6] . In 2017, the International League Against Epilepsy (ILAE) presented a new classification of the epileptic seizure types: focal epilepsy, generalized epilepsy, and epilepsy with unknown symptoms [7] . In this classification, some detailed and precise information about each of the epileptic seizure types, including the types and the brain areas experiencing convulsion, are presented [7] . The early diagnosis of epileptic seizures has enormous importance and will prevent the disease progression significantly. Many screening methods to diagnose epilepsy have been proposed until now, and the neuroimaging modalities have gained much attention from the specialized Specialist doctors [8] . Basically, the neuroimaging modalities in the diagnosis process of epileptic seizures include structural and functional methods. In the neuroimaging modalities, an epileptic seizure diagnosis based on EEG signals has remarkable popularity. EEG signal recording includes scalp EEG (sEEG) and intracranial EEG (IEEG) modalities [9] . EEG modalities include essential information from the functions of the brain in the epileptic seizures period. In comparison with other neuroimaging modalities, some benefits of EEG are a lower cost, the easiness of carrying, and suitable performance in epileptic seizure detection [9] . To diagnose epileptic seizures, doctors need to have a long record of the patient's EEG signals. The EEG signals also usually have many various channels and artifacts, which cause some difficulties and challenges for doctors in the epileptic seizures diagnosis process [9, 10] . To address these challenges, using CADS based on artificial intelligence (AI) can help to improve the speed and accuracy of the epilepsy diagnosis process [11] [12] [13] . AI-based CADS include ML and DL methods [14] [15] [16] [17] . The most significant difference between CADS based on ML and DL is in the feature extraction step [9] . In CDAS based on ML, the most important feature extraction techniques include the time domain, frequency, and nonlinear features [18] . Choosing different feature extraction algorithms together to reach a high diagnosis accuracy demands a fair amount of knowledge in the field of ML [19, 20] . On the other hand, the feature extraction and selection steps in CADS based on DL will be implemented on the deep layers. Many research projects are being conducted in the field of epileptic seizures diagnosis using DL and ML techniques . The purpose of these papers is to reach an authentic and accurate epileptic seizures diagnosis using EEG signals. One recently developed AI field in epileptic seizures detection uses feature fusion techniques [77, 78] . In these methods, a combination of features from different domains will improve the functionality and accuracy of the disease diagnosis process [77, 78] . In this work, a novel epileptic seizure diagnosis method using a combination of handcrafted features and DL has been proposed; the summary of its steps is shown in Figure 1 . The proposed method includes the dataset, preprocessing, feature extraction, and classification steps. The two different datasets of Bonn [79] and Freiburg [80] were used to implement the proposed method. In the preprocessing step, the TQWT was used in EEG signal decomposition of different sub-bands. Three variables are used for adjusting and reducing the search space of filter banks. The three important parameters of TQWT are the Q-factor, redundancy (r), and the number of sub-bands (J) [81] . The parameters Q = 1, r = 3, and J = 8 were chosen in this paper, similar to Reference [82] . After EEG signal decomposition using TQWT, various statistical, frequency, and nonlinear features are extracted. The EEG signals have a chaotic and nonlinear nature. Related works showed that nonlinear feature extraction methods play a significant role in improving the functionality and accuracy of the epileptic seizure diagnosis using EEG signals [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] . The most important nonlinear feature extraction methods from EEG signals include various types of entropies [83] , FDs [84] , graphs [85] , the largest Lyapunov exponent (LLE) [86] , and correlation coefficients (CC) [87] . In this step, various statistical, frequency, and nonlinear features are extracted in the TQWT sub-bands. In this paper, a novel class of entropy and fractal theory-based features was used. The combination of this class of handcrafted features was used in this paper for the first time as the first innovation. In this section, feature extraction algorithms were chosen and combined based on exploring other research papers and, also, their epileptic seizure diagnosis functionality. Fractal-based nonlinear features include Higuchi [88] , Katz [88] , Petrosian [88] , and the detrended fluctuation analysis (DFA) [89, 90] . Entropy-based feature extraction techniques also include Shannon [91] [92] [93] , Log-Energy [93] , spectral [94] , Sample [95] , permutation [96] , Fuzzy [97] , refined composite multiscale fuzzy [98] , graph [99] , Permutation Rényi [100] , average Shannon wavelet [101] , average Rényi wavelet [101] , average Tsallis wavelet [101] , inherent [102] , fractional fuzzy [103] , and average fuzzy [104] ; all of these methods will be covered and fully explained in the third section. In the classification step, a variety of classification methods based on ML methods and DL are used. Classification techniques based on ML involve the support vector machine (SVM) [105] and k-nearest neighbors (KNN) [106] methods. The DL method is a CNN-RNN with the proposed number of layers and is another the novelty of the paper. The proposed CNN-RNN model has two inputs. In the first input, handcrafted features will be fed into the network. In the second input, raw EEG signals of each dataset will be fed into the network differently, and various features will be extracted after passing the convolutional and long short-term memory (LSTM) layers. These features will be combined afterward and will pass into the classification algorithm. This paper is organized as follows: the proposed method for epileptic seizure detection in EEG signals is introduced in Section 2. In Section 3, the statistical metrics for the proposed method are presented. The results of the proposed method are shown in Section 4. The limitations of the study are presented in Section 5. Finally, the discussions, conclusions, and future works are introduced in Section 6. The Bonn dataset was recorded at the University of Bonn by a group of researchers, and it has been extensively used in the area of epileptic seizure analysis and detection [48] . The Bonn dataset is publicly available as 500-EEG single-channel data. It was sampled at 173.6 Hz with a 23.6 s duration. They consisted of five classes, viz., S, F, N, O, and Z, with 100 channel recordings in each class [79] . Five healthy controls in the relaxed and awake state with 10-20 standard electrode placement schemes contributed to the classes O and Z EEG surface data. Intracranial electrodes were used with five patients suffering from epilepsy to collect data of the S, F, and N classes. The hemisphere of the epileptogenic zone and the opposite hemisphere were used, respectively, for the recording of the F and S classes' signals during the interictal (seizure-free) period. The ictal (seizure) period was taken into account in case of the recording of class S [79] . Samples of EEG signals of the dataset for each class are shown in Figure 2 . Other details about the Bonn dataset are shown in Table 1 . To perform the experiments, 6 different classification problems are used, which are shown in Table 2 . The Freiburg dataset is another most frequently used resource for epileptic seizure detection [80] . It is also a freely accessible and downloadable EEG recording dataset. Twenty-one epileptic patients were considered for 24 h invasive presurgical continuous EEG signal recordings. During the time period, many seizures were recorded and occurred. This dataset includes epileptic seizure types of tonic-clonic (GTC), complex partial (CP), and simple partial (SP). Each of the cases has at least two types of epileptic seizures. The patients were from different age groups. They also differed in type and locality of seizures. The patients came to the University Hospital of Freiburg, Germany for a presurgical diagnosis. A Neurofile NT digital video EEG was used with a 256-Hz sampling rate and 128 channels [80] . The channels were numbers from 1 to 6, where the 1-3 channels were for focal recoding and 4-6 channels corresponded to extra focal ones. Interictal and ictal were the two types of signal files. The duration of the EEG signals for each patient in the ictal files was one hour. The format of the data files was ASCII. More details about this dataset is described in Table 3 . The TQWT method is described in this section. TQWT is one of the newest wavelets transforms that is widely used in the processing of biological signals such as EEG signals. In TQWT, the redundancy (r), number of frequency sub-bands (J), and Q-factor (Q) can be tuned. The TQWT method consists of two low-pass and high-pass filter banks and is used to decompose EEG signals into different sub-bands. In this section, the low-and high-pass scale factors for filter banks with two channels are represented by α and β. The low-pass filter frequency response can be described as follows [81] : The mathematical expression for the high-pass filter frequency response is as follows: In this paper, the TQWT parameters for the two datasets are r = 3, Q = 1, and J = 8, respectively. Figures 3 and 4 show the TQWT sub-bands for the Bonn and Freiburg datasets. In Figures 3 and 4 , EEG signals with different sub-band frequencies are shown. The selection of the EEG signal decomposition level was made similar Reference [81] . Additionally, Figure 5 shows the frequency response for TQWT based on the r = 3, Q = 1, and J = 8 parameters. In this section, various feature extraction methods are employed in epileptic seizure detection in the EEG signals. The feature extraction methods in the EEG signals contain the statistical, frequency domain, and nonlinear features. The nonlinear features are based on fractal theory entropy techniques. In the following section, each of these methods is discussed. The statistical features extract useful signal information, the most important of which are selected as shown in Table 4 [24] . Table 4 . Statistic features for epileptic seizure detection. Feature Name Equations The intensity weighted mean frequency (IWMF) or mean frequency is an average frequency that is calculated as the sum of the product of the normalized power spectral density (PSD) and the frequency. Consider x[k] as the normalized PSD of the signal epoch at the frequency of f [k], and the IWMF is calculated by [107] (9) (2) Intensity Weighted Bandwidth (IWBW) The weighted standard deviation of the frequency and a measure of the PSD width can be obtained from [107] . is the normalized PSD, and IMWF is the mean frequency of the input signal epoch. Whenever the PSD changes sharply, it results in a lower IWBW [107] . The fractal dimensions (FDs) are an important class of nonlinear features and play a crucial role in the processing of EEG signals. FD-based feature extraction techniques, due to their properties, increase the accuracy of epileptic seizures detection in EEG signals. In this paper, the most important FDs, including Higuchi, Katz, Petrosian, and DFA are used to epileptic seizures detection in EEG signals. In the following, each of the FDs methods is presented along with their mathematical equations. (1) Higuchi Fractal In this section, the theory of the Higuchi method is presented. Higuchi proposed this method in 1988, after which it has become a widely used technique for analyzing time series [88] . The Higuchi method is one of the most important FDs techniques that work well on nonlinear time series such as EEG signals. In the following, the steps of the Higuchi algorithm are proposed [88] . Consider x(1), x(2), . . . , x(N) the time sequence to be examined. The new time series x k m is as follows [88] . In Equation (11), k is means the discrete time interval between points, and m is means the initial time value. For each time series x k m , the average length L m (k) is as follows [88] . In Equation (12) , is a normalization factor, and N is the total length of the sequence of the data x. The delay k is computed for all EEG data with an average length k as the mean of the k lengths L m (k) for m = 1, 2, . . . , k. For each k ranging from 1 to k max, the procedure is repeated, producing the sum of the average lengths L(k) for each k as indicated below [88] . (2) Katz Fractal The FD of a curve can be termed as [88] . D = log 10 (L) log 10 (d) (14) In Equation (14), d is the estimated diameter as the distance between the points of the sequence. Also, L parameter is the total length of the curve. The equation of the d is as follows [88] : In Equation (15), Point i is the one that maximizes the first point. The measurement units used depends on the computed FDs. The FDs are different if the units are different. Katz's approach tries to resolve the issue by creating a general unit. The average step between successive points, a normalizes the distance [88] : where n is the number of steps in the curve. Finally, Katz's approach for feature extraction in EEG signals is defined as follows [88] : ( This section presents the theory of the Petrosian method. In the Petrosian method, rapid FD estimation is performed, and the results show that this method has satisfactory results. The mathematical theory of the Petrosian method is shown in (18) The Reference [89] introduced DFA, which can be used in feature extraction from time series such as EEG signals. The RR interval of the time series is incorporated y(k) and divided into nonoverlapping and equal segments of length n for conducting such an analysis. Least squares fitting is applied to obtain the local trend y n (k) in each segment and subtracted from y(k). F(n), the root mean square fluctuation estimates, are calculated at last, and the scaling exponents are measured as the slope of the double-log plot of F(n) against n [89, 90] : In this paper, different entropies are exploited to extract the characteristics of EEG signals. The entropy-based features indicate the presence of signal irregularities and are also more resistant to noise than other methods. The entropy relationships used are shown below. (1) Shannon Feature This entropy was proposed by Reference [94] and defined as In Equation (20), S n is the probability of the feature's value. (2) Log-Energy Entropy The log-energy entropy estimates the complex intensity of the signals. The log-energy entropy can be termed as [91, 93] In this section, the average entropy of wavelet Shannon is presented. If E t represents the energy of the 1st sub-band signal calculated from the wavelet coefficients, we can write the total energy of the signal as follows [101] : where K represents the total number of EEG signals obtained from the wavelet sub-bands. The wavelet energy can be calculated as follows [101] : The Shannon-based wavelet entropy relationship is defined as follows [101] : Finally, the average wavelet Shannon entropy is defined based on swn x and swn y , which represent the Swn of the time series x and y of the EEG signal, as follows [101] : (4) Average Rényi Wavelet Entropy The entropy of wavelet Rényi is defined in Relation (26) [101] : Here, the parameter α is considered equal to 2. In another definition, Rényi entropy is expressed by Relation (27) [101]: Similar to Equation (25) , the average wavelet Rényi entropy is defined as follows [35] : In Reference [101] , the entropy of wavelet Tsallis is studied in detail. Wavelet Tsallis entropy is defined as follows: where parameter a is called the nonextensivity index. The average wavelet Tsallis entropy is calculated as follows [101] : The values of X t are transformed in ascending order and, by generating X r t , the modified version of X t , the time points are renamed [100] : Therefore, each X t vector can be considered uniquely mapped on a symbol vector π = [t 1 , t 2 , . . . , t m ]. PE can be calculated as follows [100] : where log is a natural logarithm, and m! is the number of possible permutations. Since H(m) can reach ln (m!), PE is normalized. Then, the normalized PE relationship is defined by [100] . Here is a new definition of PE based on Rényi's theory as follows [100] : (7) Graph Entropy A new entropy method based on graph theory was proposed by Reference [99] . The relation of the graph entropy is described as [99] . where W ij is the weight of the link between the ith node and the jth node, and m is the number of nodes connected to the ith node [99] . For a time series x(i), fuzzy entropy (FuEn) establishes vector sequences x m i , i = {1, 2, . . . , N − m + 1} as given below [97] : where m is the length of the sequences. D m ij is the maximum absolute difference between X m i and X m j [97] . In Equations (40) and (41), r parameter is the predefined gradient, and n is the width of the exponential function. The Φ m function shows in the Eqation (41) [97] : Finally, the FuEn is introduced as Equation (42) [97]: The RCMFEσ is computed as follows [98] : RCMFEσ and RCMFEµ have differences that both use different equations in the first steps of their algorithms. The tolerance (r), Fuzzy entropy power (n), and the embedding dimension (m) [98] . This section expresses inherent fuzzy entropy (IFuEn). The steps of IFuEn are as follows [102] : Step 1. Multiple IMFs are made by breaking down the original x(t) signal and reconstructing thex(t) signal using EMD techniques, which are done as follows [102] : Calculating the extremes to cover e min (t) and e max (t) [102] . Calculating the average [102] : 3. Candidates of inherent functions are derived intrinsic mode functions (IMFs) [102] : Calculating the value of r(t) as follows [102] : Given t = t + 1, consider d(t + 1) as the input EEG data; while iterating on the residual m(t), which continues until the final residue r that becomes a monotonic function from which no more IMF can be extracted [102] . 6. The total accumulated residual IMFs are used to reconstruct thex(t) signal [102] : Step 2: FuEn to evaluate the complexity, which is similar to Equation (42) [102] . Step 3: Multi-scale version [102] y (τ) j is the coarse-grained time series, and its equation is as follows [102] : In this regard, τ is the scale factor. Also, the length of each coarse-grained time series is N/τ [102] . Average fuzzy entropy (AFuEn) is an improved model of FuEn. In AFuEn method, an improved m_ pattern Γ k X m j is compared to X m i . At this AFuEn, Equation (49) is modified as follows [104] : Finally, the AFuEn is shows as Equation (51) [104] : In Reference [103] , researchers introduced the fractional-order entropy of Shannon, which is defined as In Equation (52), α is the fractional-order derivation. Moreover, Γ and ψ denote the gamma and digamma functions, respectively. The equation of fractional-order information is defined as Equation (53): In Equation (42), FuEn is introduced. Placing Equation (53) in Equation (42), fractional fuzzy entropy (FFuEn) may be stated as This method is normalized Shannon entropy, which quantitatively defines the spectral complexity of the EEG signals as follows [94] : In the equation below, the sample entropy formula is shown [95] : where A refers to the total number of vector pairs of length m + 1, and B comprises the total number of vector pairs of length m [95] . Permutation entropy estimates the complexity of biomedical signals, such as EEG signals, by measuring the couplings between two classes. The equation of permutation entropy is presented as follows [96] : where n defines the sequence length, and p j illustrates the likelihood of the nth occurrence [96] . While these methods have been around for longer than many other machine learning algorithms, in recent decades, despite many advances in machine learning and the introduction of a wide variety of novel algorithms, support vector machines [105] have not lost their popularity and are still considered one of the most well-known and applied methods among researchers. These algorithms, which are generally based on finding hyperplanes that maximize the margin, use the kernel trick to classify data in complex and high-dimensional spaces with suitable accuracy. Linear, RBF, and polynomial are the most popular SVM kernels [105] . One of the simplest and, at the same time, most practical machine learning methods is the KNN algorithm [106] , which is widely used for classification. There is no learning phase in this method, but in the test phase, the classifier finds the K-nearest neighbor to this data point (as the name of the method implies) and assigns the data label according to their dominant label. Nevertheless, this method works very slowly in times when the amount of training data is enormous [106] . In this section, the proposed DL architecture for the detection of epileptic seizures based on EEG signals is discussed. The network used in this paper has a CNN-RNN structure with the use of extracted features. Nowadays, combined deep learning models such as CNN-RNN have achieved successful results in diagnosing and predicting diseases from medical data. Convolutional layers are usually used in the primary layers to combine CNN models with RNN, which are responsible for extracting the features. The output of the convolutional layers is then applied to the RNN layers to use their superiority to identify the global pattern [108, 109] . The purpose of this work is because the convolution layers empirically find local and spatial patterns far better than RNNs in signals [109] . Second, adding convolution layers allows the RNN to see the data faster, thus finding more distance patterns. Additionally, in this study, it has been proven that combining handcrafted features with CNN-RNN networks helps to increase the efficiency and accuracy of the CADS detection of epileptic seizures from EEG signals. In this study, the selection of the number of layers of the CNN-RNN model is presented for the first time by the researchers in this paper. In this paper, a deep CNN-RNN network with the proposed number of layers, along with handcrafted features, is used to diagnose epileptic seizures. The proposed CNN-RNN model is applied to the Bonn and Freiburg datasets, along with the handcrafted features. The CNN-RNN model has the same structure for both datasets. Figure 6 shows the proposed CNN-RNN model. Additionally, the hyper parameters of the model are shown in Table 5 . In the proposed deep learning method, there are three convolutional layers in the convolutional section to extract features and one max-pooling layer with a feature reduction purpose. After that, there is a flatten layer to transform the extracted features into feature vectors. Then, an LSTM block with 64 neurons was used to extract the RNN features. Afterwards, a combination block was used to combine the CNN-RNN and handcrafted features. Finally, three fully connected layers were implemented to classify the data. In the proposed CNN-RNN model, each layer's selection and its parameters were made by trial and error. In this paper, the classification results are evaluated using the 10-fold cross-validation techniques. In K-fold cross-validation, the total number of observations are split into K-folds, where the data samples are limited. Finally, the performance of the algorithm was estimated using statistical metrics include specificity (Spec), sensitivity (Sens), accuracy (Acc), and F1-score (F1-S), and precision (Prec). The true positive (TP), true negative (TN), false negative (FN), and false positive (FP) parameters are extracted from the confusion matrix [110] . The experiments are performed on a Ryzen 1700 machine with 8-GB RAM using MATLAB for feature extraction and TensorFlow 2 and scikit-learn for the classification algorithms. In this part of the paper, we present the results of the proposed method. The proposed method includes the preprocessing, feature extraction, and classification steps. The preprocessing step includes windowing, noise removal, and decomposition of the EEG signals into various sub-bands by the TQWT. In the first step of preprocessing, the signals from the Bonn and Freiburg datasets are decomposed into different time windows. For the Bonn dataset, each EEG signal is segmented into time windows of 5 s, and for the Freiburg dataset, each EEG signal is segmented into time windows of 4 s. In the following, a Butterworth band-pass filter is used to preprocess the signals of the datasets. In the third preprocessing step, TQWT is used for EEG signal decomposition. As mentioned earlier, the important TQWT parameters are selected as Q = 1, r = 3, and J = 8 for both datasets. In the following, various statistical, frequency, and nonlinear features are extracted from the TQWT sub-bands. The combination of these features has been done for the first time in this paper and is considered an important novelty. In the final part of CADS, the epileptic seizure detection based on EEG signals, ML classifier algorithms, and deep learning was examined and tested. The ML classifier techniques include SVM and KNN methods. On the other hand, the DL method is a CNN-RNN model. This method of classification is another novelty of this paper. Here, the proposed CNN-RNN method has two separate inputs. In the first input, Bonn or Freiburg dataset signals are applied to one of the proposed CNN-RNN network inputs. After passing the raw signals of the datasets through the one-dimensional (1D) convolutional layers, they finally reach the flatten layer. On the other hand, handcrafted feature extraction methods are applied to the second input of the proposed CNN-RNN architecture ( Figure 6) . Then, the handcrafted features and the features extracted from the 1D convolutional layers are merged and passed through the RNN layers to be finally classified. In the proposed CNN-RNN implementation on the Bonn dataset, each data is broken into 5 s windows, and after preprocessing, some features are extracted from it. At the same time, each 5 s window, which contains 868 frames of data, is broken by 25 overlaps into 33 windows, each containing 50 frames, which are used for CNN-RNN input as the raw data. In the proposed method, each 100-epoch network is trained using the categorical cross-entropy error function and Adam optimizer. It is also important to note that the implementation and configuration of the proposed CNN-RNN model for the Freiburg dataset are similar to the Bonn dataset. As can be seen in Tables 6 and 7 , the proposed CNN-RNN model has been successful in epileptic seizure detection from the Bonn and Freiburg datasets. In Table 6 , the different classifications are reviewed. The classifications were chosen similar to the research papers about epileptic seizure diagnosis based on EEG signals using the Bonn dataset . Figure 7 and Table 6 show the performances of different classifier methods for the Bonn dataset. Additionally, the results of the Fribourg dataset are shown in Table 7 . In this section, the limitations of the study are discussed. As mentioned before, epileptic seizures have various types, and their on-time diagnosis has great importance. There has been no dataset on the types of epileptic seizures so far. Therefore, researchers cannot do serious research in this field. In addition, the available EEG datasets for epileptic seizure diagnosis have limited use, and achieving actual and accurate epileptic seizure detection based on AI techniques is not possible due to this limitation. Another limitation of epileptic seizure diagnosis from EEG signals is that there are no dataset of EEG signals with preictal, ictal, and interictal times being highlighted in them. In the case of addressing these limitations, it is possible to use advanced and novel DL models to diagnose various types of epileptic seizures. Epileptic seizures are defined as a group of neurological disorders, and their early diagnosis is of particular importance for specialist physicians and neurologists [82, 111] . In order to epileptic seizures detection, several techniques have been proposed until now. Among the neuroimaging modalities, EEG is pivotally significant to specialist physicians compared to other modalities. EEG signals provide specialist physicians with accurate information about brain functions, which helps to accurately diagnose epileptic seizures. EEG signals, though very beneficial, are not bereft of disadvantages and always cause problems for specialist physicians. Long-term recording, multiple EEG channels, various noises in EEG signals, etc. are some of the physicians' difficulties that pose problems for accurately and quickly diagnosing epileptic seizures. So far, various AI methods have been proposed to epileptic seizures detection, aiming to aid specialist physicians in the rapid diagnosis of epileptic seizures based on EEG signals. Researchers in the past have mostly exploited ML methods to diagnose epileptic seizures. Inefficiency in large amounts of input data, the complexity of the methods, the need for great knowledge to use ML methods in diagnosing epileptic seizures, etc. are the most important deficiencies of these methods. To address this issue, in recent years, DL approaches have been proposed that possess appropriate efficiency and performance for diagnosing various diseases, including epileptic seizures, by using a large amount of input data. The proposed method consisted of three parts: preprocessing, feature extraction, and classification. Two datasets, Bonn and Freiburg, were exploited for the experiments. Bonn dataset signals were selected for 5 s time windows and Freiburg dataset signals for 4 s time windows. In the preprocessing step, first, a Butterworth band-pass filter was utilized for the initial preprocessing of the two dataset signals. Following the preprocessing step, the TQWT technique was adopted to decompose the EEG signal datasets into different su-bands. The TQWT parameters were selected to be applied to the two datasets similar to Reference [82] . In the following, a variety of statistical, frequency, and nonlinear features were extracted from TQWT sub-bands. Statistical features contain statistical moments. Nonlinear features also involve two categories of FDs and entropies. FD-based nonlinear features include Higuchi, Katz, Petrosian, and DFA. Entropy-based feature extraction techniques also include Shannon, Log-Energy, spectral, Sample, permutation, Fuzzy, refined composite multiscale fuzzy, graph, Permutation Rényi, average Shannon wavelet, average Rényi wavelet, average Tsallis wavelet, inherent, fractional fuzzy, and average fuzzy. In the feature extraction section, for the first time, a combination of these features has been used to epileptic seizures detection based on EEG signals and is considered the first novelty of this article. Finally, ML methods and a CNN-RNN based on a DL model were exploited in the classification step. Among the classification methods, the CNN-RNN was applied for the first time in this study and was carried to account for another novelty. Here, the proposed CNN-RNN approach entailed two separate inputs. In the first input, the EEG signals of the Bonn or Freiburg datasets were fed to one of the proposed CNN-RNN network inputs. After the raw signals of the datasets passing through the 1D convolutional layers, they eventually attained the flatten layer. On the other hand, handcrafted feature extraction methods were applied to the second input of the proposed CNN-RNN architecture ( Figure 6 ). Then, the handcrafted features and the features extracted from the one-dimensional convolutional layers were combined and passed through the RNN layers to finally be classified. In the classification section, K-fold cross-validation with K = 10 was used to calculate the valid outcomes. The proposed CNN-RNN architecture is a novel feature fusion procedure. Among the advantages of the proposed architecture, its high accuracy and greater efficiency in practical applications can be meaningful. The results identified that the proposed CNN-RNN scheme was able to achieve the maximum level of accuracy among all the algorithms used. Then, in Tables 8 and 9 , the researchers conducted on the Bonn and Freiburg datasets for the diagnosis of epileptic seizures using AI methods are presented and compared with the proposed method. According to Tables 8 and 9 , it can be perceived that the proposed CADS for the diagnosis of epileptic seizures using the handcrafted features and the proposed CNN-RNN model have achieved successful results. As shown in Tables 8 and 9 , the proposed method could improve the performance and accuracy of an epileptic seizure diagnosis in the Bonn and Freiburg datasets. The proposed method has higher performance in comparison with other research projects. Tables 8 and 9 shows that the results are reliable, and it is possible to use this proposed method in clinical applications to diagnose epileptic seizures. The proposed method in this paper has high efficacy in the diagnosis of epileptic seizures. In this method, different handcrafted features are used in combination with DL that improved the accuracy of diagnosing epileptic seizures based on EEG signals. The proposed method can help specialists rapidly diagnose epileptic seizures. This study shows that the proposed method can be implemented on a software platform and used in hospitals. In future works, graph theory methods will be utilized, coupled with novel handcrafted features [112, 113] . Additionally, applying new fuzzy entropies as feature extraction methods can be a future work. Additionally, another future work is to use fuzzy methods [114, 115] in epileptic seizure detection. In other future works, effective connectivity techniques may be used to diagnose epileptic seizures [116] [117] [118] ; first, EEG signals are transformed into 2D images using effective connectivity methods. Then, these 2 D images are applied to different 2D deep learning networks. Another future work is using novel DL techniques such as attention learning [119] [120] [121] [122] , transformers [123, 124] , and other advanced deep learning techniques [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] for epileptic seizure detection. Finally, adopting novel deep feature fusion techniques to epileptic seizures detection based on EEG signals can be noteworthy as one of the future works [135] . Clinical and Electroencephalographical Classification of Epileptic Seizures Classification of focal and non focal EEG using entropies Pharmacoresistant epilepsy: From pathogenesis to current and emerging therapies SPECT in the localisation of extratemporal and temporal seizure foci Non-invasive epileptic focus localization using EEG-triggered functional MRI and electromagnetic tomography Epileptic Seizures Detection Using Deep Learning Techniques: A Review Applications of Epileptic Seizures Detection in Neuroimaging Modalities Using Deep Learning Techniques: Methods, Challenges, and Future Works. arXiv 2021 Accuracy Enhancement of Epileptic Seizure Detection: A Deep Learning Approach with Hardware Realization of STFT Automated Epileptic Seizure Detection Methods: A Review Study Vision-based motion detection, analysis and recognition of epileptic seizures-A systematic review Focal and Non-Focal Epilepsy Localization: A Review Automatic Diagnosis of Schizophrenia using EEG Signals and CNN-LSTM Models. arXiv 2021 Applications of deep learning techniques for automated multiple sclerosis detection using magnetic resonance imaging: A review Uncertainty-aware semisupervised method using large unlabelled and limited labeled COVID-19 data Handling of uncertainty in medical data using machine learning and probability theory techniques: A review of 30 years Wavelet Ridges in EEG Diagnostic Features Extraction: Epilepsy Long-Time Monitoring and Rehabilitation after Traumatic Brain Injury Statistical Features in High-Frequency Bands of Interictal iEEG Work Efficiently in Identifying the Seizure Onset Zone in Patients with Focal Epilepsy A Framework to Assess the Information Dynamics of Source EEG Activity and Its Application to Epileptic Brain Networks An integrated alcoholic index using tunable-Q wavelet transform based features extracted from EEG signals for diagnosis of alcoholism An Automated Approach for Epilepsy Detection Based on Tunable Q-Wavelet and Firefly Feature Selection Algorithm Effect of tuning TQWT parameters on epileptic seizure detection from EEG signals A feature extraction technique based on tunable Q-factor wavelet transform for brain signal classification Tunable-Q Wavelet Transform Based Multiscale Entropy Measure for Automated Classification of Identification of Epileptic Seizures from Scalp EEG Signals Based on TQWT. In Machine Intelligence and Signal Analysis; Advances in Intelligent Systems and Computing Tunable-Q Wavelet Transform Based Multivariate Sub-Band Fuzzy Entropy with Application to Focal EEG Signal Analysis Classification of seizure and non-seizure EEG signals based on EMD-TQWT method Epileptic seizure detection in EEG signals using tunable-Q factor wavelet transform and bootstrap aggregating Application of TQWT based filter-bank for sleep apnea screening using ECG signals Decision support system for focal EEG signals using tunable-Q wavelet transform Automated identification system for seizure EEG signals using tunable-Q wavelet transform Application of tunable-Q wavelet transform based nonlinear features in epileptic seizure detection Focal EEG signal detection based on constant-bandwidth TQWT filter-banks Time-frequency representation using IEVDHM-HT with application to classification of epileptic EEG signals Complex-valued distribution entropy and its application for seizure detection An efficient error-minimized random vector functional link network for epileptic seizure classification using VMD A novel local senary pattern based epilepsy diagnosis system using EEG signals EEG Signal Analysis for Diagnosing Neurological Disorders Using Discrete Wavelet Transform and Intelligent Techniques Epilepsy Seizure Detection using Non-linear and DWT-based Features Epileptic detection based on whale optimization enhanced support vector machine Epileptic seizure detection using constrained singular spectrum analysis and 1D-local binary patterns Automatic Diagnosis of Epileptic Seizure in Electroencephalography Signals Using Nonlinear Dynamics Features Fuzzy distribution entropy and its application in automated seizure detection technique Classification of inter-ictal and ictal EEGs using multi-basis MODWPT, dimensionality reduction algorithms and LS-SVM: A comparative study Gray-level co-occurrence matrix of Fourier synchro-squeezed transform for epileptic seizure detection Machine learning-based EEG signals classification model for epileptic seizure detection Epileptic Seizure Classification of EEGs Using Time-Frequency Analysis Based Multiscale Radial Basis Functions Deep convolutional neural network for the automated detection and diagnosis of seizure using EEG signals Exploring Hermite transformation in brain signal analysis for the detection of epileptic seizure EMD-Based Temporal and Spectral Features for the Classification of EEG Signals Using Supervised Learning A new approach to characterize epileptic seizures using analytic time-frequency flexible wavelet transform and fractal dimension Detection of Seizure Event and Its Onset/Offset Using Orthonormal Triadic Wavelet Based Features A high-performance seizure detection algorithm based on Discrete Wavelet Transform (DWT) and EEG Automated System for Epileptic EEG Detection Using Iterative Filtering Automated Diagnosis of Epilepsy Using Key-Point-Based Local Binary Pattern of EEG Signals Generalized Stockwell transform and SVD-based epileptic seizure detection in EEG using random forest Detection of Epilepsy Seizures in Neo-Natal EEG Using LSTM Architecture A new automatic epilepsy serious detection method by using deep learning based on discrete wavelet transform Automatic detection of epileptic seizure based on approximate entropy, recurrence quantification analysis and convolutional neural networks Epileptic seizure detection using fuzzy-rules-based sub-band specific features and layered multi-class SVM Adaptive boost LS-SVM classification approach for time-series signal classification in epileptic seizure diagnosis applications Towards Classifying Epileptic Seizures Using Entropy Variants Epileptic Seizures Classification Based on Long-Term EEG Signal Wavelet Analysis Low Precision Electroencephalogram for Seizure Detection with Convolutional Neural Network Patient-Aware EEG-Based Feature and Classifier Selection for e-Health Epileptic Seizure Prediction Epileptic seizure detection based on imbalanced classification and wavelet packet transform Epileptic Seizure Detection Based on EEG Signals and CNN. Front Epileptic seizure detection using cross-bispectrum of electroencephalogram signal Non-linear classifiers applied to EEG analysis for epilepsy seizure detection Epileptic Seizure Detection using Deep Learning Approach Integer Convolutional Neural Network for Seizure Detection Optimum Window Size and Overlap for Robust Probabilistic Prediction of Seizures with iEEG Automatic seizure detection using a highly adaptive directional time-frequency distribution Epileptic Seizure Detection with EEG Textural Features and Imbalanced Classification Based on EasyEnsemble Learning Brain epilepsy seizure detection using bio-inspired krill herd and artificial alga optimized neural network approaches Deep Multi-scale Feature Fusion Convolutional Neural Network for Automatic Epilepsy Detection Using EEG Signals Deep Learning for EEG motor imagery classification based on multi-layer CNNs feature fusion EEG Time Series Data Wavelet Transform with Tunable Q-Factor Epileptic seizures detection in EEG signals using TQWT and ensemble learning Entropies based detection of epileptic seizures with artificial neural network Comparison of fractal dimension estimation algorithms for epileptic seizure onset detection Weighted Visibility Graph with Complex Network Features in the Detection of Epilepsy Towards automatic epileptic seizure detection in eegs based on neural networks and largest lyapunov exponent Correlation dimension and integral do not predict epileptic seizures A comparison of waveform fractal dimension algorithms Detrended Fluctuation Analysis of EEG Signals Multifractal detrended fluctuation analysis of nonstationary time series Discrimination and classification of focal and non-focal EEG signals using entropy-based features in the EMD-DWT domain Application of entropies for automated diagnosis of epilepsy using EEG signals: A review. Knowl.-Based Syst Effect of Feature Extraction of EEG Signals Using Power Spectral Entropy Using Permutation Entropy to Measure the Changes in EEG Signals during Absence Seizures Characterization of focal EEG signals: A review Refined composite multivariate generalized multiscale fuzzy entropy: A tool for complexity analysis of multichannel signals Epileptic seizure detection in EEGs signals based on the weighted visibility graph entropy Differentiating Interictal and Ictal States in Childhood Absence Epilepsy through Permutation Rényi Entropy An Integrated Index for the Identification of Focal Electroencephalogram Signals Using Discrete Wavelet Transform and Entropy Measures Inherent Fuzzy Entropy for the Improvement of EEG Complexity Evaluation Fractional fuzzy entropy algorithm and the complexity analysis for nonlinear time series Centered and Averaged Fuzzy Entropy to Improve Fuzzy Entropy Precision What is a support vector machine? Use of K-Nearest Neighbor classifier for intrusion detection Spectral EEG featuresfor evaluating cognitive load Cascaded LSTM recurrent neural network for automated sleep stage classification using single-channel EEG signals Cognitive Analysis of Working Memory Load from Eeg, by a Deep Recurrent Neural Network Detection of Epileptic Seizures on EEG Signals Using ANFIS Classifier, Autoencoders and Fuzzy Entropies. arXiv 2021 A comprehensive comparison of handcrafted features and convolutional autoencoders for epileptic seizures detection in EEG signals Graph theory analysis of directed functional brain networks in major depressive disorder based on EEG signal Modulation of Brain Functional Connectivity and Efficiency During an Endurance Cycling Task: A Source-Level EEG and Graph Theory Approach Fuzzy classifiers with information granules in feature space and logic-based computing EEG Analysis for Cognitive Failure Detection in Driving Using Type-2 Fuzzy Classifiers Severity Assessment of Social Anxiety Disorder Using Deep Learning Models on Brain Effective Connectivity Brain functional and effective connectivity based on electroencephalography recordings: A review. Hum. Brain Mapp Classification of EEG-based brain connectivity networks in schizophrenia using a multi-domain connectome convolutional neural network Deep learning for neuroimaging-based diagnosis and rehabilitation of Autism Spectrum Disorder: A review Classification of Hand Movements from EEG Using a Deep Attention-Based LSTM Network A Multi-Scale Fusion Convolutional Neural Network Based on Attention Mechanism for the Visualization Analysis of EEG Signals Decoding EEG based Continuous Speech Recognition using Transformers. arXiv 2019 Transformers for EEG Emotion Recognition. arXiv 2021 Combining a convolutional neural network with autoencoders to predict the survival chance of COVID-19 patients NAGNN: Classification of COVID-19 based on neighboring aware representation from deep graph neural network An Overview on Artificial Intelligence Techniques for Diagnosis of Schizophrenia Based on Magnetic Resonance Imaging Modalities: Methods, Challenges, and Future Works. arXiv 2021 Study on Torchvision Pre-trained Models for Fine-grained Inter-species Classification. arXiv 2021 Coronary Artery Disease Detection Using Artificial Intelligence Techniques: A Survey of Trends, Geographical Differences and Diagnostic Features Artificial intelligence within the interplay between natural and artificial computation: Advances in data science, trends and applications Automatic Myocarditis Diagnosis using Convolutional Neural Network Combined with K-means Clustering. Preprints 2020 Deep representation learning for clinical temporal data Evaluating Architecture Impacts on Deep Imitation Learning Performance for Autonomous Driving EEG Classification of Motor Imagery Using a Novel Deep Learning Framework Time Series Forecasting of New Cases and New Deaths Rate for COVID-19 using Deep Learning Methods. arXiv 2021 A customized VGG19 network with concatenation of deep and handcrafted features for brain tumor detection Funding: This research received no external funding. Data Availability Statement: Not applicable. The authors declare no conflict of interest.