Classification of epileptiform EEG using a hybrid system based on decision tree classifier and fast Fourier transform

Classification of epileptiform EEG using a hybrid system based on decision tree classifier and fast Fourier transform

Applied Mathematics and Computation 187 (2007) 1017–1026 www.elsevier.com/locate/amc Classification of epileptiform EEG using a hybrid system based on...

556KB Sizes 3 Downloads 33 Views

Applied Mathematics and Computation 187 (2007) 1017–1026 www.elsevier.com/locate/amc

Classification of epileptiform EEG using a hybrid system based on decision tree classifier and fast Fourier transform Kemal Polat *, Salih Gu¨nesß Selcuk University, Department of Electrical and Electronics Engineering, 42075 Konya, Turkey

Abstract The aim of this study is to detect epileptic seizure in EEG signals using a hybrid system based on decision tree classifier and fast Fourier transform (FFT). The present study proposes a hybrid system with two stages: feature extraction using FFT and decision making using decision tree classifier. The detection of epileptiform discharges in the electroencephalogram (EEG) is an important part in the diagnosis of epilepsy. All data set were obtained from EEG signals of healthy subjects and subjects suffering from epilepsy diseases. For healthy subjects is background EEG (scalp) with open eyes and for epileptic patients correspond to a seizure recorded in hippocampus (epileptic focus) with depth electrodes. The evolution of proposed system was conducted using k-fold cross-validation, classification accuracy, and sensitivity and specificity values. We have obtained 98.68% and 98.72% classification accuracies using 5- and 10-fold cross-validation. The stated results show that the proposed method could point out the ability of design of a new intelligent assistance diagnosis system.  2006 Elsevier Inc. All rights reserved. Keywords: Electroencephalogram (EEG); Epileptic seizure; FFT; Decision tree classifier; k-Fold cross-validation

1. Introduction The brain is a highly complex system. Understanding the behavior and dynamics of billions of interconnected neurons from the brain signal requires knowledge of several signal-processing techniques, from the linear and non-linear domains, and its correlation to the physiological events. Many investigators, for example, Duke and Pritchard [1], has proved that complex dynamical evolutions lead to chaotic regimes. In the last 30 years, experimental observations have pointed out that, in fact, chaotic systems are common in nature. A detail of such system is given by Boccaletti et al. [2]. In theoretical modeling of neural systems, emphasis has been put mainly on either stable or cyclic behaviors. Perhaps studying the chaotic behavior at neural level could help in identifying schizophrenia, insomnia, epilepsy and other disorders [3–6]. The electroencephalogram (EEG) signal is widely used clinically to investigate brain disorders. The study of the brain electrical activity, through the electroencephalographic records, is one of the most important tools *

Corresponding author. E-mail addresses: [email protected] (K. Polat), [email protected] (S. Gu¨nesß).

0096-3003/$ - see front matter  2006 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2006.09.022

1018

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

for the diagnosis of neurological diseases [7–9]. Large amounts of data are generated by EEG monitoring systems for electroencephalographic changes, and their complete visual analysis is not routinely possible. Computers have long been proposed to solve this problem and thus, automated systems to recognize electroencephalographic changes have been under study for several years [10–13]. There is a strong demand for the development of such automated devices, due to the increased use of prolonged and long-term video EEG recordings for proper evaluation and treatment of neurological diseases and prevention of the possibility of the analyst missing (or misreading) information [12,14]. Having so many factors to analyze to diagnose the epileptic seizure of a patient makes the physician’s job difficult. A physician usually makes decisions by evaluating the current test results of a patient and by referring to the previous decisions she made on other patience with the same condition. The former method depends strongly on the physician’s knowledge. On the other hand, the latter depends on the physician’s experience to compare her patient with her earlier patients. This job is not easy considering the number of factors she has to evaluate. In this crucial step, she may need an accurate tool that lists her previous decisions on the patient having same (or close to same) factors. In this study, we propose a method to diagnose the epileptic seizure. The proposed method uses decision tree classification system and FFT based Welch spectral analysis method. In our method, we first applied the Welch spectral analysis method to the EEG signals and then 129 features obtained from FFT based Welch method was applied to decision tree classifier to detection of epileptic seizure. We obtained 98.72% classification accuracy via 10-fold cross-validation on the detection of epileptic seizure. To the best of our knowledge, this classification accuracy is the highest so far. The remaining of the paper is organized as follows. We present the background related in recording EEG data in the next section. We give the proposed system in Section 3. In Section 4, we give the experimental data to show the effectiveness of our method. Finally, we conclude this paper in Section 5 with future directions. 2. Background 2.1. Recording EEG data We used the publicly available data described in [15]. In this section, we restrict ourselves to only a short description and refer to [15] for further details. The complete data set consists of five sets (denoted A–E) each containing 100 single channel EEG segments. These segments were selected and cut out from continuous multi-channel EEG recordings after visual inspection for artifacts, e.g., due to muscle activity or eye movements. Sets A and B consisted of segments taken from surface EEG recordings that were carried out on five

Fig. 1. The 10–20 international system of electrode placement.

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

1019

healthy volunteers using a standardized electrode placement scheme (Fig. 1). Volunteers were relaxed in an awake state with eyes open (A) and eyes closed (B), respectively. Sets C–E originated from EEG archive of presurgical diagnosis. EEGs from five patients were selected, all of whom had achieved complete seizure control after resection of one of the hippocampal formations, which was therefore correctly diagnosed to be the epileptogenic zone. Segments in set D were recorded from within the epileptogenic zone, and those in set C from the hippocampal formation of the opposite hemisphere of the brain. While sets C and D contained only activity measured during seizure free intervals, set E only contained seizure activity. Here segments were selected from all recording sites exhibiting ictal activity. All EEG signals were recorded with the same 128channel amplifier system, using an average common reference. The data were digitized at 173.61 samples per second using 12 bit resolution. Band-pass filter settings were 0.53–40 Hz (12 dB/oct). In this study, we used two dataset (A and E) of the complete dataset. Typical EEGs are depicted in Fig. 2 [16,17]. 3. The proposed system 3.1. The proposed hybrid system This proposed method consists of two stages: FFT based Welch method and decision tree classifier. In our method, first, we applied the Welch spectral analysis method to the EEG signals and then 129 features obtained from FFT based Welch method was applied to decision tree classifier to detection of epileptic seizure. The flow chart of the proposed method is given in Fig. 3. 3.1.1. Spectral analysis of EEG signals and Welch method: Feature extraction process Welch method of power spectrum estimation was applied on the EEG data. EEG data was grouped in frames of 256 data points and the method was applied on these frames. Welch’s method is one among the classical methods of spectrum estimation based on FFT. FFT based Welch method is defined as classical (non-parametric) method. It is made the second modification of periodogram spectral estimator, which is to window data segments prior to computing the periodogram

Fig. 2. Examples of five different sets of EEG signals taken from different subjects.

1020

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

RECORDING EEG Signals

SPECTRAL ANALYSIS Power spectral density using Welch FFT method

CLASSIFICATION Decision Tree Classifier

CLASSFICATION RESULTS Healthy Epileptic seizure Fig. 3. The flow chart of proposed system. N

[17,18]. If available information on the signal consists of the samples fxðnÞgn¼1 , the periodogram spectral estimator is given by 2   X N 1   Pb PER ðf Þ ¼  xðnÞ expðj2pfnÞ ; ð1Þ  N  n¼1 where Pb PER ðf Þ is the estimation of periodogram. In the Welch method, signals are divided into overlapping segments, each data segment is windowed, periodograms are calculated and then average of periodograms is found. {xl(n)}, l = 1, . . . , S are data segments and each segment’s length equals M. Note that, the overlap is often chosen to be 50%. The Welch spectrum estimate is given by 2   X s M X 1 1 1   Pb l ðf Þ and Pb l ðf Þ ¼ Pb w ðf Þ ¼ vðnÞxl ðnÞ expðj2pfnÞ ; ð2Þ   S l¼1 M P  n¼1 periodogram estimate of lth segment, v(n) is the data-window, P is total average of v(n) and where Pb l ðf Þ is theP M 2 given as P ¼ 1=M n¼1 jvðnÞj , Pb w ðf Þ is the Welch PSD estimate, M is the length of each signal segment and S is the number of segments. Then, evaluation of Pb w ðf Þ at the frequency samples basically requires the computation of the following discrete Fourier transform (DFT):  nk N X 2p X ðkÞ ¼ xðnÞ exp j ; k ¼ 0; . . . ; N  1; ð3Þ N n¼1 where X(k) is expressed as the discrete Fourier coefficient, N is the length of available data and x(n) is the input signal on the time domain. The procedure that computes Eq. (3) is called as FFT algorithm. The Welch PSD can be efficiently computed by the FFT algorithm. Variance of an estimator is one of the measures often used to characterize its performance. For 50% overlap and triangular window, variance for the Welch method is given by; varð Pb w ðf ÞÞ ¼

9 varð Pb l ðf ÞÞ; 8S

ð4Þ

where Pb w ðf Þ is the Welch PSD estimate and Pb l ðf Þ is the periodogram estimate of each signal interval [17–19].

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

1021

3.1.2. Decision tree classifier: decision making process Decision tree learning is one of the most widely used and practical methods for inductive inference. It is a method for approximating discrete-valued functions that is robust to noisy data and capable of learning disjunctive expressions [20,21]. Decision tree learning is a method for approximating discrete-valued functions, in which the learned function is represented by a decision tree. Learned trees can also be-represented as sets of if–then rules to improve human readability. These learning methods are among the most popular of inductive inference algorithms and have been successfully applied to a broad range of tasks from learning to diagnose medical cases to learning to assess credit risk of loan applicants. Decision tree learning is a heuristic, one-step lookahead (hill climbing), non-backtracking search through the space of all possible decision trees [20,21]. The aim of decision tree learning is recursively partition data into sub-groups. Working of decision tree learning is as follows: • Select an attribute and formulate a logical test on attribute. • Branch on each outcome of test, move subset of examples (training data) satisfying that outcome to the corresponding child node. • Run recursively on each child node. • Termination rule specifies when to declare a leaf node. Training of decision tree learning is given in Fig. 4. Definitions that used training of decision tree learning are explained as follows: • Selection: used to partition training data. • Termination condition: determines when to stop partitioning. • Pruning algorithm: attempts to prevent overfitting.

4. The experimental results 4.1. The performance evaluation methods We have used three methods for performance evaluation of epileptic seizure diagnosis. These methods are classification accuracy, sensitivity and specificity analysis, and k-fold cross-validation. We have explained these methods in the subsequent sections.

Fig. 4. Training algorithm of decision tree classifier.

1022

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

4.1.1. Classification accuracy In this study, the classification accuracies for the datasets were measured according to Eq. (5): PjT j assessðti Þ ; ti 2 T ; accuracyðT Þ ¼ i¼1 jT j  1; if classifyðtÞ ¼ t:c; assessðtÞ ¼ 0; otherwise;

ð5Þ

where T is the set of data items to be classified (the test set), t 2 T, t.c is the class of the item t, and classify (t) returns the classification of t by decision tree classifier. 4.1.2. Sensitivity, specificity For sensitivity and specificity analysis, we use the following expressions: TP ð%Þ; TP þ FN TN specificity ¼ ð%Þ; FP þ TN sensitivity ¼

ð6Þ ð7Þ

where TP, TN, FP and FN denotes true positives, true negatives, false positives and false negatives, respectively. 4.1.3. k-Fold cross-validation k-Fold cross-validation is one way to improve the holdout method. The data set is divided into k subsets, and the holdout method is repeated k times. Each time, one of the k subsets is used as the test set and the other k  1 subsets are put together to form a training set. Then the average error across all k trials is computed. The advantage of this method is that it is not important how the data is divided. Every data point appears in a test set exactly once, and appears in a training set k  1 times. The variance of the resulting estimate is reduced as k is increased. The disadvantage of this method is that the training algorithm must be rerun from scratch k

Fig. 5. Power spectral density’s (PSDs) of subject that has eye open and subject that has epileptic seizure subject from the EEG signals.

Fold

1 2 3 4 5

Training

Test

Patient

Normal

Total

Patient

Normal

Total

1280 1280 1280 1280 1280

1280 1280 1280 1280 1280

2560 2560 2560 2560 2560

320 320 320 320 320

320 320 320 320 320

640 640 640 640 640

Average results

Classification accuracy (%)

Specificity (%)

Sensitivity (%)

Number of mis-classified samples

99.80 99.80 98.00 98.90 96.90

99.68 99.68 97.81 98.45 96.87

100 100 98.11 99.36 96.87

1 1 13 7 20

98.68

98.50

98.87

8.4

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

Table 1 Obtained 5-fold CV test results by decision tree classifier for detection of epileptic seizure

1023

1024

Fold

1 2 3 4 5 6 7 8 9 10

Training

Test

Patient

Normal

Total

Patient

Normal

Total

1440 1440 1440 1440 1440 1440 1440 1440 1440 1440

1440 1440 1440 1440 1440 1440 1440 1440 1440 1440

2880 2880 2880 2880 2880 2880 2880 2880 2880 2880

160 160 160 160 160 160 160 160 160 160

160 160 160 160 160 160 160 160 160 160

320 320 320 320 320 320 320 320 320 320

Average results

Classification accuracy (%)

Specificity (%)

Sensitivity (%)

Number of mis-classified samples

100 99.70 100 99.70 97.20 98.10 99.10 99.10 95.90 98.40

100 99.68 100 99.68 98.44 99.06 99.37 99.68 97.52 99.68

100 100 100 100 98.75 99.06 99.68 99.37 98.42 98.76

0 1 0 1 9 6 3 3 13 5

98.72

99.31

99.40

4.1

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

Table 2 Obtained 10-fold CV test results by decision tree classifier for detection of epileptic seizure

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

1025

Table 3 Our method’s classification accuracy for diagnosis of epileptic seizure with classification accuracies obtained by other methods Author (year)

Method

Accuracy (%)

Guler et al. [23] Kannathal et al. [6] Subasi [16] Subasi [16] Guler et al. [14]

Recurrent neural networks ANFIS classifier Wavelet-ME Wavelet-MLPNN Wavelet-ANFIS

96.79 95 95 93.6 98.68

Our study (2006)

FFT-decision tree classifier (10 · FC)

98.72

times, which means it takes k times as much computation to make an evaluation. A variant of this method is to randomly divide the data into a test and training set k different times. The advantage of this method is that we can independently choose the size of the each test and the number of trials [22]. 4.2. The results and discussion The basic requirement to find an accurate model is the collection of well distributed, sufficient, and accurately measured input data. The key component of designing the classifier based on pattern classification is choice of the decision tree classifier inputs, because even the best classifier will perform inadequately if the inputs are not selected well. Input selection has two meanings: (1) which components of a pattern, or (2) which set of inputs best represent a given pattern [16]. We have presented power spectral density’s (PSDs) of subject that has eye open and subject that has epileptic seizure subject from the EEG signals as seen Fig. 5. The 100 EEG time series of 4096 samples for each class windowed by a rectangular window composed of 256 discrete data and then training and test sets of the classifiers were formed by 3200 vectors (1600 vectors from each class). The decision tree classifier of EEG signals trained and tested using 5- and 10-fold cross-validation due to training and test of all the EEG signals dataset. The obtained test classification accuracies were 98.68% and 98.72%, respectively. In our experimental study, EEG signals that have eye open and epileptic seizure are classified by decision tree classifier. In Table 1, the classification accuracies and sensitivity and specificity values was given for 5-fold cross-validation. The classification accuracies and sensitivity and specificity values was showed for 10-fold cross-validation in Table 2. We compare our results with previous the results reported by earlier methods. Table 3 gives the classification accuracies of our method and previous methods. As we can see from these results, our method using 10fold cross-validation obtains the highest classification accuracy, 98.72%, reported so far. As can be seen from above results, we conclude that the hybrid medical decision making system combining the FFT based Welch method and decision tree classifier obtains very promising results in classifying the possible epileptic seizure patients. We believe that the proposed system can be very helpful to the physicians for their final decision on their patients. By using such an efficient tool, they can make very accurate decisions. 5. Conclusion It is a difficult task to detection epilepsy and requires observation of the patient, an EEG, and collection of additional clinical information. Decision tree classifier that classifies subjects as having or not having an epileptic seizure provides a valuable diagnostic decision support tool for physicians treating potential epilepsy, since differing etiologies of seizures result in different treatments. In this study, we believe that this research developed an expert system for the interpretation of the EEG signals using hybrid medical decision making system designed by FFT based Welch method and decision tree classifier. The stated results show that the proposed method can make an effective interpretation of the EEG signals. The diagnosis performances of this study show the advantages of this system: it is rapid, easy to operate, non-invasive and inexpensive. This system is of the better clinical application over others, especially for earlier survey of population. The results strongly suggest that FFT based Welch method and decision tree

1026

K. Polat, S. Gu¨nesß / Applied Mathematics and Computation 187 (2007) 1017–1026

classifier based a medical decision making method can assist in the diagnosis of epileptic seizure. We hope that more interesting results will follow on further exploration of data. Acknowledgement This study is supported by the Scientific Research Projects of Selcuk University (Project No. 05401069). References [1] D. Duke, W. Pritchard, Measuring Chaos in the Human Brain, World Scientific, Singapore, 1991. [2] S. Boccaletti, C. Grebogi, Y.C. Lai, H. Mancini, D. Mazaet, The control of chaos: theory and applications, Phys. Rep. 329 (2000) 108–109. [3] L. Glass, R.G. Michel, M. Mackey, A. Shrier, Chaos in neurobiology, IEEE Trans. Syst. Man Cybern. SMC 13 (5) (1983) 790–798. [4] J. Jaeseung, C. Jeong-Ho, S.Y. Kim, H. Seol-Heui, Nonlinear dynamical analysis of the EEG in patients with Alzheimer’s disease and vacular dementia, Clin. Neurophysiol. 18 (1) (2001) 58–67. [5] F. Philippe, K. Henri, Is there chaos in the brain? Concepts of nonlinear dynamics and methods of investigation, Life Sci. 324 (2001) 773–793. [6] N. Kannathal, Min Lim Choo, U. Rajendra Acharya, P.K. Sadasivana, Entropies for detection of epilepsy in EEG, Comput. Methods Programs Biomed. 80 (2005) 187–194. [7] H. Adeli, Z. Zhou, N. Dadmehr, Analysis of EEG records in an epileptic patient using wavelet transform, J. Neurosci. Methods 123 (1) (2003) 69–87. [8] N. Hazarika, J.Z. Chen, A.C. Tsoi, A. Sergejew, Classification of EEG signals using the wavelet transform, Signal Process. 59 (1) (1997) 61–72. [9] O.A. Rosso, A. Figliola, J. Creso, E. Serrano, Analysis of wavelet-filtered tonic-clonic electroencephalogram recordings, Med. Biol. Eng. Comput. 42 (4) (2004) 516–523. [10] J.R. Glover Jr., N. Raghaven, P.Y. Ktonas, J.D. Frost Jr., Context-based automated detection of epileptogenic sharp transients in the EEG: elimination of false positives, IEEE Trans. Biomed. Eng. 36 (5) (1989) 519–527. [11] A.J. Gabor, M. Seyal, Automated interictal EEG spike detection using artificial neural networks, Electroencephalogr. Clin. Neurophysiol. 83 (5) (1992) 271–280. [12] W.R.S. Webber, B. Litt, R.P. Lesser, R.S. Fisher, I. Bankman, Automatic EEG spike detection: what should the computer imitate? Electroencephalogr. Clin. Neurophysiol. 87 (6) (1993) 364–373. [13] V.P. Nigam, D. Graupe, A neural-network-based detection of epilepsy, Neurol. Res. 26 (1) (2004) 55–60. [14] I. Guler, E.D. Ubeyli, Adaptive neuro-fuzzy inference system for classification of EEG signals using wavelet coefficients, J. Neurosci. Methods 148 (2005) 113–121. [15] R.G. Andrzejak, K. Lehnertz, F. Mormann, C. Rieke, P. David, C.E. Elger, Indications of nonlinear deterministic and finitedimensional structures in time series of brain electrical activity: dependence on recording region and brain state, Phys. Rev. E 64 (2001) 061907. [16] A. Subasi, EEG signal classification using wavelet feature extraction and a mixture of expert model, Expert Systems with Applications, in press. [17] D. Evans, Doppler signal analysis, Ultrasound Med. Biol. 26 (Supplement 1) (2000) S13–S15. [18] P.J. Vaitkus, R.S.C. Cobbold, K.W. Johnston, A comparative study and assessment of Doppler ultrasound spectral estimation techniques part II: methods and results, Ultrasound Med. Biol. 14 (1988) 673–688. [19] I. Guler, F. Hardalac, M. Kaymaz, Comparison of FFT and adaptive ARMA methods in transcranial Doppler signals recorded from the cerebral vessels, Comput. Biol. Med. 32 (2002) 445–453. [20] M.T. Mitchell, Machine Learning, McGraw-Hill, Singapore, 1997. [21] J.R. Quinlan, Induction of decision trees, Mach. Learn. 1 (1986) 81–106. [22] R. Kohavi, F. Provost, Glossary of terms. Editorial for the Special Issue on Applications of Machine Learning and the Knowledge Discovery Process, 30(2/3) (1998). [23] N.F. Guler, E.D. Ubeyli, I. Guler, Recurrent neural networks employing Lyapunov exponents for EEG signals classification, Expert Syst. Appl. 29 (2005) 506–514.