Abstract
Epileptic EEG signal recognition is an important method for epilepsy detection. In essence, epileptic EEG signal recognition is a typical imbalanced classification task. However, traditional machine learning methods used for imbalanced epileptic EEG signal recognition face many challenges: (1) traditional machine learning methods often ignore the imbalance of epileptic EEG signals, which leads to misclassification of positive samples and may cause serious consequences and (2) the existing imbalanced classification methods ignore the interrelationship between samples, resulting in poor classification performance. To overcome these challenges, a graphbased extreme learning machine method (GELM) is proposed for imbalanced epileptic EEG signal recognition. The proposed method uses graph theory to construct a relationship graph of samples according to data distribution. Then, a model combining the relationship graph and ELM is constructed; it inherits the rapid learning and good generalization capabilities of ELM and improves the classification performance. Experiments on a real imbalanced epileptic EEG dataset demonstrated the effectiveness and applicability of the proposed method.
1. Introduction
Epilepsy is a common neurological disease that can cause recurrent seizures. During seizures, injury or lifethreatening events may occur owing to the distraction or involuntary spasms of the patient [1, 2]. In the clinical diagnosis of various seizures, electroencephalogram (EEG) signal detection plays a crucial role [3]. This is because the epileptic brain releases characteristic waves during seizures. In recent years, an increasing number of machine learningbased methods have been applied for epileptic EEG signal recognition [4–8]. Figure 1 illustrates a machine learning methodbased system for epileptic EEG signal recognition. The figure shows that an epileptic EEG signal recognition system involves the following three main steps: (1) a feature extraction method is used on original epileptic EEG signals for training and testing, (2) EEG signals after feature extraction for training are used to train the machine learningbased model to build an epileptic EEG signal recognition system, and 3) EEG signals after feature extraction for testing are then inputted into the epileptic EEG signal recognition system for detection.
Previously, many machine learning methods have been proposed for epileptic EEG signal recognition, such as the naive Bayes method (NB) [9], nearest neighbor (KNN) [10], support vector machine (SVM) [11], fuzzy system [12, 13], and extreme learning machine (ELM) [14, 15], and they have shown good effectiveness. In essence, epileptic EEG signal recognition is a typical imbalanced classification task [16, 17]. Compared with negative samples (people without epilepsy), positive samples (patients with epilepsy) have extremely low representation and cannot be well classified by traditional classifiers. Although the misclassification of positive samples has little effect on the model accuracy, it may cause serious medical malpractice. Therefore, traditional machine learning methods face several critical challenges for recognition of imbalanced epileptic EEG signals: (1) traditional machine learning methods often ignore the imbalance of epileptic EEG signals and misclassify positive samples, which may cause serious medical malpractice, and (2) existing imbalanced classification methods ignore the interrelationship between samples, resulting in poor classification performance. Therefore, building a classifier that considers the imbalance of the epileptic EEG signals and additional knowledge of samples becomes imperative for classification of imbalanced datasets with epileptic EEG signals.
To overcome these challenges, a novel imbalanced epileptic EEG signal recognition method based on a graph and ELM is proposed in this study. ELM has become a classical machine learning method with its solid theoretical foundations, fast training speed, and good predictive performance [18, 19]. Although ELM can universally approximate to any continuous functions, it is not effective for classifying imbalanced datasets. Therefore, it is necessary to adopt strategies to make ELM correctly classify positive samples to obtain a reasonable classification result of an imbalanced dataset. Previously, numerous imbalanced ELMbased methods have been proposed. For example, Zong et al. [20] proposed the weighted extreme learning machine (WELM), which pioneered the application of ELM in imbalanced classification. Similarly, Zhang and Ji [21] proposed a fuzzy ELM (FELM), which regulated the distributions of penalty factors by inserting a fuzzy matrix. Yu et al. [22] proposed a special costsensitive ELM (ODOCELM) for imbalanced classification problems. Li et al. [23] proposed an ensemble WELM algorithm based on the AdaBoost framework to learn the weights of different samples adaptively. Yang et al. [24] proposed a novel ELMbased imbalanced classification method by estimating the probability density distributions for two imbalanced classes. Shukla and Yadav [25] combined CCELM with WELM to propose a regularized weighted CCELM. Xiao et al. [26] proposed an imbalanced ELMbased algorithm for two classes of classification tasks by solving each class classification error. Du et al. [27] proposed an online sequential extreme learning machine with under and oversampling(OSELMUO) for online imbalanced big data classification. In addition, some ELMbased imbalanced methods, such as ensemble weighted ELM [28], classspecific cost regulation ELM [29], labelweighted extreme learning machine [30], and classspecific ELM [31], have also been proposed. However, to the best of our knowledge, there is no study that uses imbalanced ELM methods for epileptic EEG signal recognition; therefore, it is necessary to propose such a method for epileptic EEG signal recognition.
In this study, inspired by WELM, we propose a novel graphbased ELM (GELM) for imbalanced epileptic EEG signal recognition. First, we use the graph theory to construct a relationship graph of samples according to their data distribution. Then, we combine the relationship graph with ELM to propose GELM. The experimental results on a real imbalanced epileptic EEG dataset show that the proposed method can address imbalanced classification of epileptic EEG signals effectively. The main contributions of this study are as follows. (1)The proposed GELM sets the compensation for loss of positive samples to be greater than that of negative samples based on graph theory and then combines with the ELM to classify imbalanced data effectively. It is a novel imbalanced ELMbased method, which attains a good classification performance and inherits the rapid learning and good generalization capabilities of ELM(2)The proposed imbalanced classification method attempts to consider both the imbalance and interrelationship of epileptic EEG samples to obtain better performance for imbalanced epileptic EEG signal recognition. It can be utilized for imbalanced epileptic EEG signal recognition. It not only realizes effective classification of imbalanced epileptic EEG signals from a new perspective but also expands application of ELMbased algorithms(3)We use six imbalanced classification evaluation indices, i.e., accuracy, precision, recall, measure, _means, and AUC, to compare the performance of the proposed GELM and the existing imbalanced ELMbased methods. Extensive experiments on a real imbalanced epileptic EEG dataset indicate that the proposed method can address imbalanced epileptic EEG signal recognition effectively and outperform the existing imbalanced ELMbased methods
The rest of this paper is organized as follows. Section 2 introduces the background underlying the proposed epileptic EEG recognition method. In Section 3, the details of the proposed GELM are presented. The performance of the proposed method is evaluated with several comparative methods in Section 4. The conclusions of this paper are provided in Section 5.
2. Background
In this section, we briefly describe the background related to the proposed epileptic EEG signal recognition method. It includes the epileptic EEG dataset, the feature extraction methods, and the classical ELM, which are used for epileptic EEG signal detection.
2.1. Epileptic EEG Dataset
The real epileptic EEG dataset used in this paper is Bonn [32], which is from the University of Bonn, Germany. It can be publicly downloaded from the following website (http://www.epileptologiebonn.de/cms/upload/workgroup/lehnertz/eegdata.html). There are five groups (denoted by A–E, respectively) in Bonn. In each group, there are 100 samples of 23.6 s segments. Detailed descriptions of the five groups are given in Table 1. Groups A and B are segments acquired from five healthy volunteers with eyes open (Group A) and eyes closed (Group B). Groups C–E are segments acquired from volunteers with epilepsy. In Group C, EEG signals are measured in the hippocampus of the brain during seizurefree intervals and those in Group D are measured in the epileptogenic zone during seizurefree intervals. In Group E, EEG signals are measured during seizure activity. Five representative original epileptic EEG signals of five different groups are shown in Figure 2.
2.2. Feature Extraction
Many studies [33–35] have shown that the original EEG signals cannot be directly used for training machine learningbased models and that feature extraction is a necessary step. This is because the original EEG signals are usually high dimensional, stochastic, nonstationary, and nonlinear and the background noise in the original signals is very complex. The commonly used feature extraction methods can be divided into three main categories: time domain analysis, frequency domain analysis, and timefrequency analysis. Time domain analysisbased methods extract the features by analyzing the characteristics of original EEG signals, such as mean, variance, amplitude, and kurtosis [36]. Frequency domain analysisbased methods usually analyze the EEG signals in the frequency domain to extract the features, such as fast Fourier transforms [37] and shorttime Fourier transforms [38]. As for timefrequency analysis methods, the information of time and frequency domain is considered simultaneously to extract the features from original epileptic EEG signals. Typical timefrequency analysisbased methods are wavelet transform methods [39, 40]. In this paper, we use the wavelet packet decomposition [40] for feature extraction from original epileptic EEG signals to simultaneously utilize the information of time and frequency domain.
2.3. ELM
ELM [19], which was first proposed by Huang et al., is a singlehiddenlayer feedforward neural network [41]. It can directly optimize the output weight of the hidden layer by setting the number of hidden nodes, without paying attention to the weight and offset of the input layer, which can be generated randomly. Compared with other traditional supervised learning methods, it has good generalization ability and high learning speed. Figure 3 shows the network structure of an ELM.
ELM considers both empirical and structural risks, and its objective function is as follows: where represents the hidden layer feature matrix, where , represents the th row of the weight matrix , represents the offset, denotes the training samples, is the number of training samples, is dimension, and is the number of hidden nodes; is the error matrix between the network outputs and the target outputs. is a penalty parameter, which can adjust the accuracy and generalization ability of the ELM.
The optimization problem in (1) can be solved based on the Karush–Kuhn–Tucker theory. The output weight of ELM can be calculated by
3. GraphBased Extreme Learning Machine
In this section, a graphbased ELM (GELM) is proposed. We first introduce the relationship graph of an imbalanced dataset and then develop the proposed imbalanced classification method GELM by combining the relationship graph with an ELM.
3.1. Relationship Graph of an Imbalanced Dataset
In the context of imbalanced classification problem, the relationships between the training samples can be regarded as an undirected graph.
Undirected graph can be expressed as , where is the vertex set of graph and is the edge set of graph . Figure 4 shows an undirected graph of an imbalanced synthetic dataset with 7 samples, where 2 positive samples are represented by a blue circle and 5 negative samples are represented by a red star. All samples are numbered for subsequent display. Note that there are connections between samples in different classes and the weight is 1. Samples in the same class are not connected.
The elements of an adjacency matrix can be defined as follows:
Here, is the label of .
According to the above definition of the adjacency matrix , we can see that the distance of the samples in the same class can be considered 0. For samples in different classes, the distance between them can be considered 1.
Then, the relationship graph matrix can be expressed as where is the degree matrix; stands for a vector with , whose elements are exactly 1; is the number of training samples.
As for the imbalanced dataset , we need to increase the loss of misclassification of positive samples because the misclassification of positive samples (patients with epilepsy) could cause serious consequences. This can be realized by regulating the degree matrix . The shortcomings of the cost learning algorithm can be compensated by increasing the relationship between samples. Therefore, the relationship graph not only ensures the accuracy of positive sample classification but also makes up for the lack of the mutual relationships and prior knowledge between samples.
According to the above description, the relationship graph matrix of the synthetic dataset in Figure 4 can be expressed as
3.2. Objective Function of GELM
According to the above relationship graph and ELM, the objective function of the GELM can be expressed as follows:
Here, , is the number of samples in , is the sample dimension, and represents the true class label of the samples. and are the same as defined in ELM. represents the output weight vector. represents the loss between the network outputs and the target outputs. Equation (8) is the relationship graph matrix of the samples.
By comparing (7) with (1), we can see that GELM is an improved version of ELM and still has the characteristics of high learning speed and strong generalization ability from ELM.
3.3. Solution of GELM
In this subsection, we attempt to optimize the objective function of GELM. According to [20], the objective function of GELM is a convex optimization problem. The specific optimization solution process is as follows:
The Lagrangian function corresponding to (7) is
Let the derivation of with respect to , , equal to zero:
Substituting (10a) and (10b) into (10c), we obtain
Combining (10a) and (11), we obtain
With the obtained solution, i.e., , the predicted class label of the testing sample can be obtained as follows: where is a testing sample.
3.4. Learning Algorithm of GELM
According to the above derivation, the implementation of GELM is summarized in Algorithm 1.

4. Experiments
To demonstrate the effectiveness of the proposed GELM, we conducted extensive experiments on a real epileptic EEG dataset. The proposed GELM was verified by comparing it with five ELMbased methods, i.e., ELM [19], W1ELM [20], W2ELM [20], R1ELM [25], and R2ELM [25], using six imbalanced classification evaluation indices and average standard deviation on the real Bonn dataset. Except for ELM, the other comparison methods are imbalanced classification methods. All the experiments were conducted on a computer with Intel Core i53317U 1.70 GHz CPU and 16 GB RAM by using MATLAB 2016a. The details of the experimental settings and results are presented in the following sections.
4.1. Data Preparation
Although the real Bonn dataset has been used in many studies, the way of using it in this study differs from those in previous works. To evaluate the performance of the proposed GELM, nine imbalanced datasets were generated from the original five groups of EEG signals to simulate the imbalanced classification scenario. The details of the nine datasets are summarized in Table 2. In each dataset, the EEG signals of patients with epilepsy (E) were regarded as a positive class, while the other groups were regarded as a negative class, to identify whether the patients with epilepsy are experiencing seizure activity. A brief description of the five groups (A, B, C, D, and E) can be found in Table 1. The last column of Table 2 is , which is used to show the degree of imbalance of the dataset. can be defined as follows: where and represent the number of samples of the positive class and the negative class, respectively.
In our experiment, we randomly partitioned each dataset. In each dataset, 80% of the dataset were used for training and the remaining 20% were used for testing.
4.2. Evaluation Indices
In our experiments, we used six imbalanced classification evaluation indices to evaluate all the adopted methods. The six imbalanced classification evaluation indices were accuracy, precision, recall, measure, _means, and AUC, which can be, respectively, defined as
Here, is the number of true positive samples, is the number of false negative samples, is the number of true negative samples, and is the number of false positive samples, respectively. where is the set of all the indexes of the positive samples and is the set of those of the negative samples; and . is the prediction value of . is the indicator function
Fmeasure, G_means, and AUC are commonly used imbalanced classification evaluation indices [42–45].
4.3. Adopted Methods and Parameter Settings
In the experiments, five ELMbased methods, i.e., ELM [19], W1ELM [20], W2ELM [20], R1ELM [25], and R2ELM [25], were adopted for comparisons with GELM. Referring to the guidelines in [2, 20, 46], a grid search strategy based on _means was used to determine appropriate parameters of all the methods. We set parameter in the range of and parameter in the range of for all the adopted methods. All the adopted methods were run ten times on each generated imbalanced dataset. The average experimental results corresponding to the six imbalanced classification evaluation indices are reported.
4.4. Experimental Results
To evaluate the classification performance of the proposed GELM, five ELMbased methods were used for performance comparison. All experiments were repeated ten times for fairness. The mean and standard deviation of the corresponding indices of all methods in each dataset are reported in Tables 3–8. The best results are shown in bold. The improvement of GELM relative to ELM on all datasets using the six imbalanced classification evaluation indices is shown in Figure 5.
According to experimental results in Tables 3–8, the following observations can be made: (1)For the adopted six imbalanced classification evaluation indices, the proposed GELM performs best on most datasets. This is because GELM can suppress the misclassification of negative samples while considering the accuracy of positive samples and has a high classification performance, which is suitable for imbalanced epileptic EEG signal recognition(2)In general, GELM, R1ELM, R2ELM, W1ELM, and W2ELM achieved better performances than ELM. This is due to the addition of a cost matrix, which makes them more suitable for imbalanced classification. Moreover, GELM has the best effect because it adds sample information using a relationship graph(3)Tables 4 and 5 show the results of recall and precision of all methods. They evaluate the performance of imbalanced classification from two different perspectives. From the excellent performance of GELM in Tables 4 and 5, we can see that adding information regarding relationships between samples can increase the weight of positive samples(4)measure and _means in Tables 6 and 7 are two important indices to measure the performance of imbalanced classification methods, which can be combined with recall and precision to evaluate the effect of the methods. From the results, we can see that the proposed GELM has the best performance. It has excellent performance in imbalanced epileptic EEG signal recognition(5)AUC is an important index to evaluate imbalanced classifiers. From Table 8, we can see that the performance of GELM on all datasets is the best. GELM has excellent performance in imbalanced classification and good effectiveness of imbalanced epileptic EEG signal recognition
4.5. Statistical Analysis
Statistical analysis was performed to further analyze the performances of all the adopted methods in our experiments. For conciseness, we only present statistical analysis of the _means results. Firstly, the Friedman test [47] was used to calculate the average ranking of each method. The rankings of all the adopted methods are shown in Figure 6. In Figure 6, we can see that the performance of GELM is the best.
Then, the post hoc hypothesis test [48] was used to evaluate the statistical significance of the performance differences between GELM and the other adopted methods. Post hoc hypothesis test results are presented in Table 9. In Table 9, we can see that the null hypothesis is rejected when due to . Therefore, performance differences between GELM and the other adopted methods are significant, which means that GELM is effective for imbalanced epileptic EEG signal recognition.
5. Conclusions
In this study, we aimed to address the challenge that traditional machine learning methods ignore the imbalance of epileptic EEG datasets and the existing imbalanced classification methods ignore the relationships between samples. A graphbased ELM was proposed for imbalanced epileptic EEG signal recognition. First, graph theory was used to construct the relationship between samples according to the distribution. Second, a model combining the relationship graph and ELM was proposed; this model inherited the rapid learning and good generalization capabilities of ELM while maintaining satisfactory classification. Experiments on a real imbalanced epileptic EEG dataset demonstrated the effectiveness and applicability of the proposed method. However, there is still room for improvement in the scope and search method of the optimal parameters in this experiment. In the future, ways to design a better method to determine the optimal parameters will be further studied and explored.
Data Availability
Data can be downloaded from http://www.epileptologiebonn.de/cms/upload/workgroup/lehnertz/eegdata.html.
Conflicts of Interest
None of the authors have any conflicts of interest.
Acknowledgments
This work was supported in part by the National Natural Science Foundation of China under Grant 61772198 and by the Natural Science Foundation of Jiangsu Province under Grant BK20161268.