Detecting Epileptic Seizures in EEG Signals with Complementary Ensemble Empirical Mode Decomposition and Extreme Gradient Boosting

Epilepsy is a common nervous system disease that is characterized by recurrent seizures. An electroencephalogram (EEG) records neural activity, and it is commonly used for the diagnosis of epilepsy. To achieve accurate detection of epileptic seizures, an automatic detection approach of epileptic seizures, integrating complementary ensemble empirical mode decomposition (CEEMD) and extreme gradient boosting (XGBoost), named CEEMD-XGBoost, is proposed. Firstly, the decomposition method, CEEMD, which is capable of effectively reducing the influence of mode mixing and end effects, was utilized to divide raw EEG signals into a set of intrinsic mode functions (IMFs) and residues. Secondly, the multi-domain features were extracted from raw signals and the decomposed components, and they were further selected according to the importance scores of the extracted features. Finally, XGBoost was applied to develop the epileptic seizure detection model. Experiments were conducted on two benchmark epilepsy EEG datasets, named the Bonn dataset and the CHB-MIT (Children’s Hospital Boston and Massachusetts Institute of Technology) dataset, to evaluate the performance of our proposed CEEMD-XGBoost. The extensive experimental results indicated that, compared with some previous EEG classification models, CEEMD-XGBoost can significantly enhance the detection performance of epileptic seizures in terms of sensitivity, specificity, and accuracy.


Introduction
Epilepsy is a common cerebral disorder. It is reported that a prevalence of 0.6%-0.8% of the global population suffers from this disease [1]. Epilepsy is generally characterized by a transient disorder of the nervous system and unpredictable occurrence [2]. Epileptic seizures generally fall into two main categories: partial and generalized [3]. The main difference between these two types of epileptic seizures lies in the occurrence region of the brain. Both epileptic seizures can occur for all races, ages, and ethnic back-grounds, but they are more common in younger and older demographics [4]. Epileptic seizures not only harm the sensory, motor, and functional aspects of the body, but they also affect the consciousness, memory, and cognition of patients [5]. Therefore, it is of great practical significance to develop an effective detection approach for epileptic seizures [6].
An electroencephalogram (EEG) is a typical measure to record the electrical activity in brains using sensors, and it can be used for epilepsy diagnosis, sleep-stage analysis, brain-computer interfaces (BCIs), and so on [7,8]. Due to it being painless and convenient, EEG is the most popular detection

Complete Ensemble Empirical Mode Decomposition
As one type of typical time-frequency analysis approach, empirical mode decomposition (EMD) [52] was proposed for time series or signal analysis fields, such as engineering, medicine, financial data analysis, etc. EMD decomposes raw time series into intrinsic mode functions (IMFs) and one residue. IMF is a function that satisfies two conditions: (1) the number of zero crossings and local extrema must either be equal to or differ at most by one; (2) the mean value of the envelope defined by the local minima and the local maxima is zero at any point. The detailed decomposition process is as follows: EMD firstly retrieves the upper and the lower envelopes which are calculated by the local extrema of the original series. Then, cubic spline is employed to construct the upper and lower envelopes by linking the local extrema. The mean of these envelopes is calculated as the first residue. Lastly, the difference between the original series and the first residue is defined as the first IMF. An illustration of EMD is demonstrated in Figure 1.

Complete Ensemble Empirical Mode Decomposition
As one type of typical time-frequency analysis approach, empirical mode decomposition (EMD) [52] was proposed for time series or signal analysis fields, such as engineering, medicine, financial data analysis, etc. EMD decomposes raw time series into intrinsic mode functions (IMFs) and one residue. IMF is a function that satisfies two conditions: (1) the number of zero crossings and local extrema must either be equal to or differ at most by one; (2) the mean value of the envelope defined by the local minima and the local maxima is zero at any point. The detailed decomposition process is as follows: EMD firstly retrieves the upper and the lower envelopes which are calculated by the local extrema of the original series. Then, cubic spline is employed to construct the upper and lower envelopes by linking the local extrema. The mean of these envelopes is calculated as the first residue. Lastly, the difference between the original series and the first residue is defined as the first IMF. An illustration of EMD is demonstrated in Figure 1. EMD continues to decompose the first residue into another IMF and one new residue. The above process repeats until the variance of the new residue is small enough to satisfy the Cauchy criterion. Finally, EMD decomposes the original series into several IMFs and one residue.
However, disparate scales in IMF components may appear in EMD mode mixing, which is defined either as a single IMF containing signals of wildly disparate scales or as a signal of a similar scale residing in different IMF components [53]. Therefore, a noise-added ensemble EMD (EEMD) was designed to cope with the problem of mode mixing [46,53,54]. Although EEMD can effectively deal with the influence of mode mixing, another problem can be caused, such as residue noise. Complete ensemble empirical mode decomposition (CEEMD) [55,56] was developed from the previous EMD and EEMD, where different noises are appended in different stages and then each mode is generated by a unique residue. CEEMD decomposes the original series with N different noise realizations by utilizing pairs of positive and negative white noises to generate complementary IMFs. CEEMD both solves the mode mixing problem and provides an exact reconstruction of the original series. Compared with wavelet decomposition, CEEMD has no resolution or harmonic complication problem [57].
By using CEEMD, a raw EEG signal can be seen as the sum of several IMFs and one residue R. Normally, The IMFs and residue are relatively simpler than the raw complex EEG signal. Then, we can extract a set of multi-domain features from the decomposed components. Thus, we expect that more detailed features of the decomposed components are able to contribute to enhancing the performance of epileptic seizure detection. EMD continues to decompose the first residue into another IMF and one new residue. The above process repeats until the variance of the new residue is small enough to satisfy the Cauchy criterion. Finally, EMD decomposes the original series into several IMFs and one residue.
However, disparate scales in IMF components may appear in EMD mode mixing, which is defined either as a single IMF containing signals of wildly disparate scales or as a signal of a similar scale residing in different IMF components [53]. Therefore, a noise-added ensemble EMD (EEMD) was designed to cope with the problem of mode mixing [46,53,54]. Although EEMD can effectively deal with the influence of mode mixing, another problem can be caused, such as residue noise. Complete ensemble empirical mode decomposition (CEEMD) [55,56] was developed from the previous EMD and EEMD, where different noises are appended in different stages and then each mode is generated by a unique residue. CEEMD decomposes the original series with N different noise realizations by utilizing pairs of positive and negative white noises to generate complementary IMFs. CEEMD both solves the mode mixing problem and provides an exact reconstruction of the original series. Compared with wavelet decomposition, CEEMD has no resolution or harmonic complication problem [57].
By using CEEMD, a raw EEG signal can be seen as the sum of several IMFs and one residue R. Normally, The IMFs and residue are relatively simpler than the raw complex EEG signal. Then, we can extract a set of multi-domain features from the decomposed components. Thus, we expect that more detailed features of the decomposed components are able to contribute to enhancing the performance of epileptic seizure detection.

Extreme Gradient Boosting
As a kind of gradient boosting machine (GBM), XGBoost [58][59][60] is commonly employed for supervised learning problems. XGBoost follows the previous ideas in gradient boosting and constructs a "strong" learner by integrating the predictions of a group of "weak" sub-learners whose prediction performances are just a little better than random guessing. In XGBoost model, the "weak" sub-learners are generally regression trees. The combination of these "weak" sub-learners employs a gradient learning strategy. Basically, a first "weak" sub-learner is trained and, subsequently, a second sub-learner is constructed to fit the residuals of the first one. All steps of training a model to fit the residuals of the previous one are repeated until the stopping criterion is satisfied. Thus, the XGBoost model is a weighted ensemble of these individual predictions of the "weak" sub-learners. Let I be a molecule with a vector of x i ; then, the XGBoost model can be seen as the ensemble of K additive functions.
where F is a group of regression trees. The function f k makes the k prediction based on a certain output. The whole training process is to construct regression trees, including the structures of the trees and the leaf scores. In order to avoid trapping into overfitting, XGBoost should simplify the complexity of the model by decreasing the computation. Therefore, the XGBoost model is built on the loss + penalty objective function. Ob where l is a loss function that is used to measure the difference between the target y i and the prediction y i . Ω is used to penalize the complexity of the model, and it is calculated based on the scores of each leaf and the number of leaves. The main point of the calibration process of XGBoost model is ultimately described as follows: Ob where H and G are determined by the Taylor series expansion of the loss function, T represents the number of leaves, and λ is the L2 regularization parameter. Since XGBoost exhibits good prediction and classification accuracy [47][48][49], it was adopted to construct the epileptic seizure detection model in this study.

Framework
Based on multi-domain features, this study proposes an epileptic seizure classification technique that combines CEEMD with XGBoost, named CEEMD-XGBoost, to automatically detect epileptic seizures. The proposed model consists of three stages, as shown in Figure 2.
Stage 1: Decomposition. In view of the highly complex characteristics of raw EEG signals, it is hard to achieve satisfactory detection performance using raw signals. In order to better extract features from raw EEG signals, one common method is to transform raw EEG signals into sub-signals. Therefore, CEEMD is employed to divide each raw EEG signal x(n) into (1) M IMF components IMF j (j = 1, 2, . . . , M) and (2) one residue component R.  The proposed CEEMD-XGBoost employs the strategy of "divide and conquer", which is very popular in energy forecasting, fault diagnosis, image processing, and so on [42][43][44][45][46][61][62][63]. It firstly applies CEEMD to decompose each raw signal into a set of components (several IMFs and one residue). Generally, the high-frequency characteristics are retained in the first IMFs, while the remaining IMFs and the residue imply the low-frequency characteristics of the raw EEG signal. Secondly, a group of multi-domain features are subsequently extracted, and then the relevant features are selected based on their importance scores. In previous research, the features were extracted from either raw EEG signals or decomposed signals. Since both raw EEG signals and decomposed signals may contain potentially useful characteristics for the subsequent classifier construction, we expect that extracting features from both raw EEG signals and decomposed signals contributes to the performance improvement of the epileptic seizure detection model. Thus, we extracted various features, including the time-domain, frequency-domain, time-frequency, and entropy-based features, from raw EEG signals and decomposed IMFs and residue. Feature selection is conducted using XGBoost. Finally, the relevant features are fed into an XGBoost model to construct the epileptic seizure detection model.
Significantly, some recent studies integrated decomposition and classification models to detect seizures using EEG signals. However, these previous studies differed from this study with respect to decomposition, feature extraction, and/or classification approach in that (1) they decomposed raw EEG signals using wavelet decomposition transform, EMD, etc., (2) they extracted features from either raw EEG signals or decomposed signals, and (3) they detected epileptic seizures using traditional classifiers. Previous studies demonstrated that CEEMD is superior to EMD and XGBoost shows better classification performance than traditional classifiers. In contrast, the current study uses CEEMD to divide raw EEG signals into several subseries, and further develops an epileptic seizure detection model using XGBoost based on the relevant features extracted from both raw EEG signals and decomposed subseries.  The proposed CEEMD-XGBoost employs the strategy of "divide and conquer", which is very popular in energy forecasting, fault diagnosis, image processing, and so on [42][43][44][45][46][61][62][63]. It firstly applies CEEMD to decompose each raw signal into a set of components (several IMFs and one residue). Generally, the high-frequency characteristics are retained in the first IMFs, while the remaining IMFs and the residue imply the low-frequency characteristics of the raw EEG signal. Secondly, a group of multi-domain features are subsequently extracted, and then the relevant features are selected based on their importance scores. In previous research, the features were extracted from either raw EEG signals or decomposed signals. Since both raw EEG signals and decomposed signals may contain potentially useful characteristics for the subsequent classifier construction, we expect that extracting features from both raw EEG signals and decomposed signals contributes to the performance improvement of the epileptic seizure detection model. Thus, we extracted various features, including the time-domain, frequency-domain, time-frequency, and entropy-based features, from raw EEG signals and decomposed IMFs and residue. Feature selection is conducted using XGBoost. Finally, the relevant features are fed into an XGBoost model to construct the epileptic seizure detection model.
Significantly, some recent studies integrated decomposition and classification models to detect seizures using EEG signals. However, these previous studies differed from this study with respect to decomposition, feature extraction, and/or classification approach in that (1) they decomposed raw EEG signals using wavelet decomposition transform, EMD, etc., (2) they extracted features from either raw EEG signals or decomposed signals, and (3) they detected epileptic seizures using traditional classifiers. Previous studies demonstrated that CEEMD is superior to EMD and XGBoost shows better classification performance than traditional classifiers. In contrast, the current study uses CEEMD to divide raw EEG signals into several subseries, and further develops an epileptic seizure detection model using XGBoost based on the relevant features extracted from both raw EEG signals and decomposed subseries.

Dataset
To evaluate the performance of our proposed CEEMD-XGBoost, this study used two benchmark EEG datasets, including the Bonn dataset and the CHB-MIT dataset. The Bonn EEG segments were collected from the epilepsy dataset of Bonn University [50]. The EEG dataset contains five subsets (A, B, C, D, and E), and each one consists of 100 single-channel segments. These segments were selected and cut out from continuous multi-channel EEG recordings. The EEG segments of sets A and B were acquired from five healthy volunteers, who were awake with eyes open and closed. Sets C, D, and E originated from the EEG archive of presurgical diagnosis. Sets C and D were from five patients and contain only activity measured during seizure-free intervals. Set E only contains EEG segments collected from the epileptogenic zone during epileptic seizure activity. The sampling rate of Bonn EEG data is 173.61 Hz, and an EEG segment lasts for 23.6 s. Thus, each signal segment contains 173.61 × 23.6 = 4097 sampling points. More detailed information on the Bonn EEG dataset can be accessed in Reference [50]. The above five EEG subsets were utilized in the current study. Table 1 lists the summary of the Bonn EEG dataset.
The second dataset named the CHB-MIT dataset was collected from the Children's Hospital Boston, and it is available at PhysioNet [51]. The CHB-MIT dataset recorded the multi-channel EEG signals of 23 patients during epileptic seizure and non-seizure activity. These 23 patients included 18 females and five males from age 2-22. There are 23 channels in most EEG files and 24 channels in a few cases, and the sampling rate is 256 Hz. The segments of each seizure in EEG signals were annotated by experts. Figure 3 illustrates one segment of multi-channel EEG signals of patient 01 in the CHB-MIT dataset. As shown in Figure 3, an epileptic seizure began at the fourth second, and then the EEG signal dramatically fluctuated after the red bar.

EEG Signal Decomposition
Because of the complexity of raw signals, decomposition methods are commonly used to decompose raw signals for better performance of prediction and classification in the field of signal processing [22]. This idea can also be utilized in epileptic seizure detection because of the nonlinearity and nonstationary of EEG signals. We employed CEEMD to decompose each raw EEG signal into

EEG Signal Decomposition
Because of the complexity of raw signals, decomposition methods are commonly used to decompose raw signals for better performance of prediction and classification in the field of signal processing [22]. This idea can also be utilized in epileptic seizure detection because of the nonlinearity and nonstationary of EEG signals. We employed CEEMD to decompose each raw EEG signal into several IMFs and one residue according to amplitude and frequency in this study. Then, these raw EEG signals and the decomposed components were considered for the subsequent feature extraction. As an example, the two raw EEG segments and corresponding components decomposed using CEEMD from set A in the Bonn dataset and patient 01 in the CHB-MIT dataset are illustrated in Figures 4 and 5, respectively.    It can be seen from these two figures that the decomposed subseries are simpler than the raw EEG signals, which is probably helpful for the feature extraction and the subsequent classification.

Feature Extraction
Feature extraction is important for representing nonstationary and nonlinear EEG signals. To potentially enhance the detection performance, we extract multi-domain features from raw EEG signals, the decomposed IMFs, and residues, which can more comprehensively represent the It can be seen from these two figures that the decomposed subseries are simpler than the raw EEG signals, which is probably helpful for the feature extraction and the subsequent classification.

Feature Extraction
Feature extraction is important for representing nonstationary and nonlinear EEG signals. To potentially enhance the detection performance, we extract multi-domain features from raw EEG signals, the decomposed IMFs, and residues, which can more comprehensively represent the characteristics of EEG signals. The aforementioned studies used either time-frequency domain or entropy domain features for epileptic seizure detection. In this work, we employed three Python packages called Tsfresh [64], Entropy (https://github.com/raphaelvallat/entropy), and pyEntropy (https://github.com/nikdon/pyEntropy) to extract four categories of features from both raw EEG signals and the decomposed components: (1) time domain features; (2) frequency domain features; (3) time-frequency domain features; (4) entropy-based features. Specifically, Tsfresh conducted the feature extraction process using 63 time series characterization methods, which calculated a total of 794 descriptive time series features, including the above four categories of features. Additionally, we extracted four entropy-based features using Entropy and pyEntropy Python packages. Thus, we extracted 798 features in total for a time series. Since a raw Bonn EEG signal was decomposed into 12 IMFs and one residue, and a raw CHB-MIT EEG signal into 14 IMFs and one residue, we totally extracted 798 × 14 = 11,172 features for the Bonn dataset and 798 × 16 = 12,768 features for the CHB-MIT dataset.

Time Domain, Frequency Domain, and Time-Frequency Domain Features
Previous research showed that extracting features from different domains, including time domain, frequency domain, and/or time-frequency domain, is effective for developing epileptic seizure detection models [11][12][13][14][15][16][17][18][19][20][21][23][24][25][26]. Although these three types of features were proposed, none are able to comprehensively characterize EEG signals. Therefore, the combination of all of these features has the potential to improve the classification performance. In this study, time domain, frequency domain, and time-frequency domain features were extracted using Tsfresh Python packages, which are listed in Table 2. The complete list of the 794 descriptive time series features is available in Reference [64].

Entropy-Based Features
Entropy is commonly used to measure the amount of disorder in the system [65]. It can be utilized to measure the randomness of signals and to analyze complex EEG signals. We totally extracted six entropy-based features including permutation entropy, Shannon entropy, spectral entropy, approximate entropy, sample entropy, and singular value decomposition entropy.
• Permutation entropy Permutation entropy (PE), which was introduced by Christoph and Bernd [66], is utilized to measure the complexity of time series through comparing neighboring values. It can be calculated as follows [67]: where N represents the length of the decomposed signal, t k is the occurrence of k-th symbol, s k indicates the probability of occurrence of the k-th permutation in the time series, and n implies permutation order of n ≥ 2. In this study, we chose the embedding dimension m of 3 and delay of 1.
• Shannon entropy Shannon entropy (ShE) is a standard measure of sequential state, and it can be used to estimate the average minimum number of bits required for symbol coding in terms of the frequency of the symbol [32]. It can be expressed as where i represents all observed values of EEG series data, and p(i) represents the probability that value occurs in the whole EEG series.
• Spectral entropy Because of the difference of signal intensity among individuals, the absolute values may vary from individual to individual, but Shannon entropy is not standardized as the total power of EEG signals [68]. In order to overcome this shortcoming, spectral entropy (SpE) is adopted in this study. Spectral entropy is defined to be the Shannon entropy of the power spectral density (PSD) of the data. It can be expressed as follows: where p f is the relative power of the component with frequency f. f was set to 100 in this study.
• Approximate entropy Approximate entropy (ApE) is utilized to quantify the unpredictability of fluctuations and the regularity of time series. A smaller value means that the data perform well in terms of regularity and prediction [69]. It can be expressed as follows: d(x(i), x( j)) = max k=1,2,...,m where m, r, τ, and N represent the embedding dimension, similarity coefficient, time delay, and number of data points, respectively. The correlation dimension is computed by Equation (10). When x is smaller than 0, the value of θ(x) is equal to 0. d(x(i), x( j)) measures the distance by Equation (11).
In this work, we chose m = 2, r = 0.15 times the standard deviation of the EEG signal, and τ = 1.
• Sample entropy Sample entropy (SaE) is derived from approximate entropy and is used to assess the complexity of physiological time series signals [70]. In the aspect of trouble-free implementation and data length independence, it does better than ApE. SaE can be expressed as where B m (r) represents the probability of matching two sequences for m points, while A m (r) indicates the probability of matching two sequences for m + 1 points. m, r, and τ were set to 2, 0.2 times the standard deviation of the EEG signal, and 1 in this study, respectively.
• Singular value decomposition entropy Singular value decomposition entropy (SvdE) is an indicator of the number of eigenvectors needed to fully interpret the data set. In other words, it measures the dimensions of data. It can be calculated as follows: where M represents the number of singular values of the embedded matrix Y, which can be obtained by Equation (14). σ 1 , σ 2 , . . . , σ M are the normalized singular values of Y. r indicates the order of permutation entropy, and τ represents the time delay, which were respectively set to 3 and 1 in this study.

Classification and Performance Evaluation
Since each EEG signal was decomposed into several IMFs and one residue, we extracted a large number of features from raw EEG signals and the decomposed ones. Due to the large number of features, performing classification in such a high-dimensional feature space may influence the classification performance. In addition, the feature space may contain some irrelevant features, which reduces the classification performance and increases the computing cost. Feature selection plays a very key role in classifier training, which chooses the best subset of features from all the extracted features. In this study, redundant features were removed due to their low importance scores in XGBoost, and the threshold of the importance scores was set to 0.001. Since XGBoost shows better classification performance than traditional classifiers, it was chosen as the classifier for epileptic seizure detection. Thus, the pruned features were fed into the subsequent classifier XGBoost.
To accurately evaluate the classification performance and decrease the potential bias of training and testing data, k-fold cross-validation was employed in this study. Generally, the detection performance is evaluated by three main statistical measurements of sensitivity (SEN), specificity (SPE), and accuracy (ACC).
where TP is true positive, FP is false positive, TN is true negative, and FN is false negative.

Experimental Settings
To compare the performance of our proposed methodology with previous research, two benchmark EEG datasets, including the Bonn dataset and the CHB-MIT dataset, were used in this study. Since the Bonn EEG dataset consists of five subsets, the various cases of the Bonn dataset were considered as shown in Table 3. In addition, to further assess the performance of CEEMD-XGBoost in discriminating non-seizure and seizure, we applied the proposed method to a larger dataset named the CHB-MIT EEG dataset. Because the original CHB-MIT signals are not directly segmented into sub-series of non-seizure or seizure states, we manually divided them into a collection of overlapped fragments with a fixed length. Following previous research [71,72], with a three-second sliding window, we split both seizure and non-seizure segments from five patients who were randomly selected in the CHB-MIT dataset, and we eventually obtained an EEG segment dataset, including 2675 epileptic seizure segments and 2675 non-seizure segments. Since each EEG signal contains 23 channels and the sampling rate is 256 Hz, the three-second EEG fragment included 17,664 sampling points. In general, the CHB-MIT EEG segment dataset has 5350 23-channel EEG segments, including 2675 seizure segments and 2675 seizure-free ones, and each segment consists of 17,664 sampling points. Figure 6 illustrates the process of the CHB-MIT EEG signal segmentation. The Bonn dataset and the CHB-MIT dataset used in this article are publicly accessible EEG datasets. This article does not contain any studies with human participants performed by any of the authors.

Experimental Settings
To compare the performance of our proposed methodology with previous research, two benchmark EEG datasets, including the Bonn dataset and the CHB-MIT dataset, were used in this study. Since the Bonn EEG dataset consists of five subsets, the various cases of the Bonn dataset were considered as shown in Table 3. In addition, to further assess the performance of CEEMD-XGBoost in discriminating non-seizure and seizure, we applied the proposed method to a larger dataset named the CHB-MIT EEG dataset. Because the original CHB-MIT signals are not directly segmented into sub-series of non-seizure or seizure states, we manually divided them into a collection of overlapped fragments with a fixed length. Following previous research [71,72], with a three-second sliding window, we split both seizure and non-seizure segments from five patients who were randomly selected in the CHB-MIT dataset, and we eventually obtained an EEG segment dataset, including 2675 epileptic seizure segments and 2675 non-seizure segments. Since each EEG signal contains 23 channels and the sampling rate is 256 Hz, the three-second EEG fragment included 17,664 sampling points. In general, the CHB-MIT EEG segment dataset has 5350 23-channel EEG segments, including 2675 seizure segments and 2675 seizure-free ones, and each segment consists of 17,664 sampling points. Figure 6 illustrates the process of the CHB-MIT EEG signal segmentation. The Bonn dataset and the CHB-MIT dataset used in this article are publicly accessible EEG datasets. This article does not contain any studies with human participants performed by any of the authors. Thus, our subsequent epileptic seizure detection was conducted on these EEG fragments, as shown in Table 3. Table 3. Various cases considered in this study. Thus, our subsequent epileptic seizure detection was conducted on these EEG fragments, as shown in Table 3.
In order to better estimate the performance of our proposed method, k-fold cross-validation (k = 10) was employed. The entire dataset was evenly divided into 10 subsets. Each subset was used for testing the model once and for training the model nine times. The performance was estimated by averaging the performances derived in all the 10 cases of cross-validation.
All experiments were performed using Python 3 on a 64-bit Microsoft Windows 10 with an i7-8565U 1.8 GHz central processing unit (CPU) and 8 GB of random-access memory (RAM).

Experimental Results of the Proposed Methodology
In this study, each EEG segment was firstly transformed into several IMFs and one residue using CEEMD. Specifically, in consideration of the length of raw EEG signal, each EEG segment in the Bonn dataset was decomposed into 12 IMFs and one residue, and each EEG segment in the CHB-MIT dataset was divided into 14 IMFs and one residue. Then, the relevant features were extracted from multi-domains, and the optimal feature subset was further selected. The XGBoost classifier was developed to detect epileptic seizures in EEG signals. Table 4 reports the classification results of 10-fold cross-validation of the 13 cases in the Bonn dataset and the CHB-MIT dataset, respectively. For each case in Table 4, the corresponding classification performance declined with the increasing number of categories. As for the Bonn dataset, it can be observed that two-class classification cases showed the best performance among all cases For the CHB-MIT dataset, our proposed method performed worse in terms of classification accuracy than the Bonn dataset. Compared with the single channel signals, the multi-channel ones contain more information and are more complex. Although the multi-channel EEG records contain more information of epileptic seizure, there may be some channels which are irrelevant and redundant. Therefore, it is possible to lead to a decrease in detection performance.
As for the execution time of 10-fold cross-validation, it increased with the increase in size of the dataset. In general, the proposed CEEMD-XGBoost achieved promising detection performance, and the detection accuracies were higher than or equal to 99.00% in all 12 cases in the Bonn dataset and 95.79% in the CHB-MIT dataset.

Classification Performance Comparison with State-of-the-Art Seizure Detection Methods
To better assess the classification performance of our proposed methodology, it was compared with some of the previous methods using the Bonn EEG dataset and the CHB-MIT EEG dataset. The classification accuracies of the proposed approach and the existing techniques for various classification cases are listed in Tables 5-8. The experimental results demonstrated that the proposed method achieved the highest detection accuracies in most cases compared with the previous methods. Table 5. Accuracy (in %) comparison with some of the existing techniques for cases I-V on the Bonn dataset.

Authors
Year   Table 6. Accuracy (in %) comparison with some of the existing techniques for cases VI-X on the Bonn dataset.

Authors
Year Methods    Table 8 shows that our proposed method achieved the highest classification accuracy on the CHB-MIT dataset. On one hand, based on the same decomposition method (i.e., CEEMD), XGBoost obtained the highest classification accuracy compared with neural network (NN), support vector machine (SVM), and random forest (RF). On the other hand, our proposed method also obtained the highest classification accuracy compared with some previous studies.

AB-E CD-E ACD-E BCD-E ABCD-E
In Therefore, CEEMD-XGBoost is a promising approach for epileptic seizure detection.

Discussion
To more comprehensively investigate our proposed CEEMD-XGBoost, we further discuss some characteristics of the proposed model for epileptic seizure detection, including the impact of CEEMD and the importance of features.

The Impact of CEEMD
On the basis of the same feature extraction, feature selection, and classification method (XGBoost), we evaluated the impact of CEEMD on the detection performance. Table 9 reports the corresponding classification results of 10-fold cross-validation with and without CEEMD on the Bonn dataset and the CHB-MIT dataset. Table 9 demonstrates that the proposed method CEEMD-XGBoost outperformed the XGBoost without CEEMD in all cases and achieved better classification performance. The results show that CEEMD had a significant positive impact on the classification performance, indicating that extracting features from the decomposed signal can improve the detection performance.

The Importance of the Selected Features
To gain deep insight into the importance rank of individual features for epileptic seizure detection, which was rarely examined in previous literature, we selected XGBoost for feature ranking and pruning. An advantage of using XGBoost is that it is relatively straightforward to calculate importance scores for each feature after the boosted trees are built. Generally, feature importance provides a score that represents how important each feature is in the boosted decision trees. The more a feature is employed to make key decisions using decision trees, the higher its relative importance score becomes. For a single decision tree, the importance is calculated by the amount that each feature split point improves the performance measure. The feature importance is eventually averaged across all of the decision trees in the XGBoost model. Since the importance is computed for each feature, features can be ranked and compared to each other.
To comprehensively assess the importance of features on the two datasets, we performed a feature ranking based on five classifications (A-B-C-D-E) on the Bonn dataset and two classifications (Non-seizure-seizure) on the CHB-MIT dataset using XGBoost. According to the importance scores of features, we rank the input features and list the 20 most important features along with their relative importance scores in Tables 10 and 11.
From Table 10, we can see that the 20 most important features on the Bonn dataset came from different feature categories. Among the top 20 features, 13, three, three, and one features belonged to the categories of time-domain, frequency, entropy-based, and time-frequency, respectively, indicating that the multi-domain features contributed to epileptic seizure detection. On the other hand, we find that the top 20 features were extracted from different components, including the raw signal, IMF 1 , IMF 2 , IMF 3 , IMF 4 , and IMF 10 , which further validated the effect of EEG signal decomposition. In other words, decomposing each raw EEG signal into several components (IMFs and one residue) contributed to extracting more comprehensive features.   From Table 11, we can see something similar to Table 10. Among the top 20 features, 14, four, one, and one features belonged to the categories of time-domain, frequency, entropy-based, and time-frequency, respectively, and these features came from the raw EEG signal, IMF 1 , IMF 2 , IMF 3 , IMF 4 , IMF 5 , IMF 7 , and IMF 8 , which further confirmed the effectiveness of feature extraction and signal decomposition.
In summary, decomposing raw EEG signals into sub-components benefits the extracted features in representing raw EEG signals. The better classification performance can be attributed to the highly discriminative features. The extracted multi-domain features better represent nonstationary and nonlinear EEG signals. Furthermore, the XGBoost classifier has a superior classification capability to other classifiers. Hence, the above three main factors led to the satisfactory classification accuracy in our work.

Conclusions
It is a big challenge to accurately detect epileptic seizures due to the complexity of EEG signals. For the purpose of better detecting epileptic seizures using EEG signals, this paper proposed a novel epileptic seizure detection approach integrating CEEMD and XGBoost. Firstly, CEEMD was utilized to decompose each raw EEG signal into a collection of IMFs and one residue. Then, a group of multi-domain features were extracted from both raw signals and decomposed components, and they were further chosen according to the importance of the extracted features. Finally, XGBoost was applied to develop a classification model to detect seizure-free and seizure EEG signals. To the best of our knowledge, this is the first application of a combination of CEEMD and XGBoost to epileptic seizure detection. The extensive experimental results demonstrate that (1) compared with some state-of-the-art classification models, the CEEMD-XGBoost model can significantly enhance the detection performance of epileptic seizure in EEG signals, (2) by decomposing raw EEG signals into sub-components, we can better extract features to represent raw EEG signals, and (3) individual multi-domain features have different levels of importance for the classification performance, and the most important features come from multiple domains.
Since a large number of features are extracted and input into the classifier for epileptic seizure detection, the proposed CEEMD-XGBoost may need higher computing cost than single-domain feature methods. Future work could be extended in three aspects: (1) extracting more effective features to build epileptic seizure detection models, such as bispectrum features, etc.; (2) further investigating and comparing the contribution of different categories of features; (3) evaluating the scaling ability of CEEMD-XGBoost using more EEG data, such as the TUH (Temple University Hospital) EEG epilepsy corpus, etc.