Research Article  Open Access
Sahar H. ElKhafif, Mohamed A. ElBrawany, "Artificial Neural NetworkBased Automated ECG Signal Classifier", International Scholarly Research Notices, vol. 2013, Article ID 261917, 6 pages, 2013. https://doi.org/10.1155/2013/261917
Artificial Neural NetworkBased Automated ECG Signal Classifier
Abstract
The ECG signal is well known for its nonlinear dynamic behavior and a key characteristic that is utilized in this research; the nonlinear component of its dynamics changes more significantly between normal and abnormal conditions than does the linear one. As the higherorder statistics (HOS) preserve phase information, this study makes use of onedimensional slices from the higherorder spectral domain of normal and ischemic subjects. A feedforward multilayer neural network (NN) with error backpropagation (BP) learning algorithm was used as an automated ECG classifier to investigate the possibility of recognizing ischemic heart disease from normal ECG signals. Different NN structures are tested using two data sets extracted from polyspectrum slices and polycoherence indices of the ECG signals. ECG signals from the MIT/BIH CDROM, the Normal Sinus Rhythm Database (NSRDB), and European STT database have been utilized in this paper. The best classification rates obtained are 93% and 91.9% using EDBD learning rule with two hidden layers for the first structure and one hidden layer for the second structure, respectively. The results successfully showed that the presented NNbased classifier can be used for diagnosis of ischemic heart disease.
1. Introduction
The ECG signal indicates the electrical activity of the heart. Variations in the amplitude and duration of the ECG signal from a predefined pattern have been used routinely to detect the cardiac abnormality. Because of the difficulty to interpret these variations manually, a computeraided diagnosis system can help in monitoring the cardiac health status. Because of the nonlinear and nonstationary nature of the ECG signal, nonlinear extraction methods are good candidates for extracting the information in the ECG signal [1].
Since artificial neural networks are basically a pattern matching technique based on nonlinear inputoutput mapping, it can be effectively used for detecting morphological changes in nonlinear signals such as the ECG signal.
The issue of selecting an optimal set of relevant features plays an important role in pattern classification. To meet higher accuracy in pattern classification it is not adequate if we have the best pattern classification system. The selected features must be capable of separating the classes at least to some useful degree. Otherwise they become irrelevant. It is important that the selected features must be screened for redundancy and irrelevancy [2]. Although different methods can be used to extract diverse features from the same raw data, the integration of a feature extractor and a pattern classifier is essentially important.
Recently different approaches have been proposed for feature extraction, cardiac health diagnosis, and ischemia detection from ECG signals; these include discrete wavelet transform, cosine transform, and the discrete Fourier transform [1, 3–6]. Moreover, methods including NN and neurofuzzy models have been used for ECG signal classification [3]. In [7, 8] NN models were applied, while [3, 9, 10] utilized neurofuzzy approaches and NNs, principal component analysis [11], and multilayer perceptron [9, 12]. Features extracted from higherorder spectra of heart rate variability were used for detecting cardiac abnormalities [13]. Engin et al. [14] used autoregressive coefficients: thirdorder cumulant and wavelet transform variances as features for arrhythmia classification.
In this paper, slices from the higherorder spectra, namely, the polyspectrum slices and polycoherence indices of normal and ischemic ECG signals are used as input features to an NN classifier. As the HOS preserve phase information, it is hypothesized that these slices will reflect the nonlinear character of the signal which will preserve important information that can help locate the differences between normal and ischemic ECG waveforms. An automated ECG signal classifier was implemented using adaptive neural networks with backpropagation (BP) approach to classify normal and ischemic subjects.
2. Materials and Methods
2.1. ECG Data
Normal ECG data from the MIT/BIH CDROM, the Normal Sinus Rhythm Database (NSRDB) [15], and ischemic ECG data from the European STT database (EDB) [16] are used. The NSRDB contains 18 records, between 20 and 24 hours each, from subjects without diagnosed cardiac abnormalities. The sampling frequency is 128 Hz. The EDB consists of 90 twochannel records, of twohour duration each, taken from ambulatory ECG recordings and digitised at 250 Hz. A total of 800,000 samples or about 6420 ECG beats from 18 normal subjects and 1650,000 samples or about 6600 ECG beats from 27 ischemic subjects were analysed. Modified lead II was used for analysis.
Figure 1 shows the general configuration of the different stages employed in the classification process. In signal preprocessing stage the ECG signal is highpass filtered (cutoff frequency: 0.5 Hz) to remove the baseline wander. Then Rpeaks of the underlying ECG signals are detected and the segment length (mean value of ECG cycle) has been identified. The Kaiser smoothing window is applied throughout this analysis [17]. In the feature extractor stage the polyspectrum and polycoherence slices are calculated using an algorithm by Zhou and Giannakis [18]. Each slice is the average of fifty slices for each subject. Several Matlab routines have been implemented by the authors for calculation and extraction of the polyspectrum and polycoherence slices and to prepare the input data files with the desired patterns (features) in the format required for the NN training and testing phases. Section 2.3 presents briefly the backpropagation algorithms used for the training of the neural network classifier while the selection of the training data sets is presented in Section 2.4.
2.2. Polyspectrum Slices
An algorithm by Zhou and Giannakis [18] was used to estimate the diagonal slices of the polyspectrum and polycoherence indices with multiple independent records [19]. The diagonal slices of the polyspectrum, , and polycoherence, , indices are as follows: where is the order, is the number of samples in one record, is the selfcoupling frequency, is the 2ndorder spectrum, and .
Multiple independent records are required for correct estimation of the polycoherence index, which increases the computations required but still has the advantage of being onedimensional.
2.3. Backpropagation Algorithm
An adaptive BP algorithm is used for the training procedure [20, 21] in two phases. Firstly, the inputs are presented to the network, which propagate forward to produce the output for each neuron, , in the output layer. The activity of each neuron is determined, , where is the sigmoid activation function and are constants. Then the error signal is generated: where is the desired output for neuron at iteration . The BP algorithm changes the weight vector, , of NN so as to minimize the error function, , defined by where the includes all neurons in the output layer. The correction applied to is defined by Training of the NN is based on an adaptive algorithm with the parameter changing. If in (4) 0, a minimum has been reached.
2.4. Selection of the Training Sets
In this paper, two sets of features (S1 and S2) are used in training and testing the NNs; these are [19] as follows:(i)S1 consists of polycoherence index slices in the frequency range 0–20 Hz for polyspectrum order . This set requires an input layer of 20 neurons. S1 consists of 120 patterns for the training phase and 74 different patterns for the test phase. Figure 2 shows examples of this input feature for normal and ischemic ECG signals, (ii)S2 consists of multiple features from the HOS domain, these are [19] as follows:(1)the polyspectrum order and the diagonal slices of the polyspectrum for orders 2 to 10 in the frequency range 0–20 Hz, (2)the Maximum polycoherence Index (MPI): the value of the polycoherence index at the frequency of the maximal intensity (peak frequency) on the polyspectrum slice, (3)the Average polycoherence Index (API): the mean value along the diagonal slice of the polycoherence index.
(a)
(b)
(c)
(d)
The data set, S2, is represented by an input layer of 23 neurons and consists of 234 examples for the training phase and 117 different examples for the test phase.
3. Classifier Training and Testing
A feedforward multilayer neural network with error backpropagation learning algorithm is built using NNs software package, (NeuralWorks Pro II Plus and NeuralWorks Predict, NeuralWare Inc.). Three NN structures (NN1, NN2, and NN3) are implemented and tested. NN1 is implemented using the NeuralWorks Pro II package using both S1 and S2 data sets. The NeuralWorks Predict program is used to implement NN2 and NN3 using S1 for NN1 and S2 for NN3.
Traditionally, the user must specify the number of hidden layers and the number of hidden units in each layer and find appropriate transformations and determine the relevance of various combinations of inputs which is largely a trialanderror process. However, NeuralWorks Predict not only automates network construction using cascade correlation [22] but also automatically applies transformations to raw values and incorporates a genetic algorithm optimizer to identify the most influential variables from raw and transformed values to serve as final inputs to train the neural network. This approach means that the NeuralWorks Predict often produces networks that have minimum structure and sometimes with no hidden units.
4. Results
4.1. Datasets and NN Structure Assessment
Initially the NeuralWorks II Pro is used to assess the datasets and choose a suitable learning rule and number of hidden layers. The dataset S1 has been used to study the effect of the various learning rules (Delta Rule (DR), DeltaBarDelta (DBD), and Extended DeltaBarDelta (EDBD)) [21] and the number of hidden layers on the network performance. The results for two NN1 structures, namely, “2052” and “20532,” will be presented. A hyperbolic tan activation function for each neuron in the input, hidden, and output layers was used.
Figure 3 shows the RMS error during the learning phase of NN1 as a function of epoch. No convergence is achieved using the DR (Figure 3(a)) while the DBD resulted in slow convergence (Figure 3(b)). The EDBD rule gave a faster convergence and a smaller RMS error (Figures 3(c) and 3(d)) especially for two hidden layers (Figure 3(d)). Table 1 summarises the results obtained using DR, DBD, and EDBD with one and two hidden layers. The training parameters are and , 0.2, and 0.15 for the first and second hidden and output layers, respectively, and an epoch = 30 patterns. On the other hand, using dataset S2 as a training set, under the same conditions mentioned above, resulted in no convergence. In the next subsection, the NeuralWorks Predict will be applied to use its extensive search capabilities to tune the network structure and optimize the most influential inputs.

(a)
(b)
(c)
(d)
4.2. Ischemic ECG Classification
The two previously explained sets of features, namely, S1 and S2 constitute “the basic inputs” to the NN2 and NN3 classifiers, respectively. Direct connections from the input layer to the output layer have been used. Connections from previously established hidden processing elements to more recently established hidden processing elements (i.e., cascade connections) are also employed. The activation functions within each neuron in the input and hidden layers are the hyperbolic tan while a softmax function is used for the output neuron.
NN2 is trained with and without hidden layer structure of (2031) or (201), respectively. Much better results are obtained in the structure with one hidden layer. This comes in agreement with the nature of the ECG signal which is highly nonlinear. A total of 74 patterns have been used in this test. Fortythree patterns are extracted from normal ECG signals while the rest (31) correspond to ischemic ECG signals. The classifier managed to detect 68 patterns with a classification rate of 91.9%. Table 2 shows the performance of the NN2 classifier. Figure 4 shows the receiver operating characteristics (ROC) of the classifier with the hit rate on the vertical axis and the false alarm rate on the horizontal axis.

In training NN3 some transformation functions, namely, logarithmic function, inverse fourthpower function, and square function are applied to the input features S2. These inputs are called “the transformed inputs” to distinguish them from the basic inputs. The resulted network structure was 721 based on the best results for the classifier. A total of 117 patterns have been used in this test. Fiftyfour patterns are extracted from normal ECG signals while the rest (63) correspond to ischemic ECG signals. The classifier managed to detect 88 patterns with a classification rate of 75.2%. Table 3 shows the performance of the NN3 classifier. Figure 5 shows the ROC of the classifier. Table 1 is a summary of the all NN structures and classification rates obtained. The resulted accuracy, sensitivity, and specificity of NN2 are 91.9%, 90.3%, and 93%, respectively.

5. Discussion
An automated adaptive backpropagation NNbased classifier is implemented. The results show that NN classifier can be used effectively in ECG signal processing for fast and reliable detection of ischemia especially in the case of critical care units and in longterm ECG signal monitoring. It was proven that the polyspectrum and polycoherence indices slices are excellent features to represent these ECG dynamics [19]. In this paper, information from the whole ECG cycle was used. This is considerably different from the previous ischemia detection algorithms [6, 8, 9, 12] in that (1) it avoids the use of the Jpoint and the STsegment whose detection is often difficult and time consuming, (2) the training sets are slices from the frequency domain and (3) the effective power of the HOS in preserving nonlinearity was exploited by using features from the higherorder domain. These features are onedimensional slices and can be calculated within few seconds. Using these slices the NN was trained for ischemic episode detection rather than ischemic beat detection. Classification rates of 93% using NN1 and 91.9% using NN2 were obtained using polycoherence index slices from the 6thorder polyspectral domain as “basic inputs” (S1 dataset), while using multiple features from the higherorder domain has resulted in either no convergence (using S1 and NN1) or a lower classification rate (75.2%) using “transformed inputs” from S2 (NN3) (Table 4). The reason may be attributed to the limited number of input patterns and their variability for different subjects and from a polyspectrum order to another. Another reason may be the proper choice of combination of the multiple features, which puts a big research question of how these multiple features can be utilized efficiently in ECG modelling and classification. This explains why the NN classifier has converged using the “transformed inputs” and failed to converge using “basic inputs.” The ROC curve and the RMS error were used to assess the performance of the NN classifiers.

6. Conclusions
In this paper, several neural networkbased classifiers were assessed and deployed to automatically classify normal and ischemic ECGs. These classifiers were trained using the polyspectrum patterns and features extracted from the higherorder spectral analysis of normal and ischemic ECG signals. These input patterns are Gaussian noisefree and contain both amplitude and phase information. The highest classification rate was obtained using the polycoherence index slices as input features, with the Extended DeltaBarDelta learning rule and two hidden layers. In the presented work, the use of slices from higherorder statistics shows its strength in analysing and classifying nonlinear ECG dynamics.
Conflict of Interests
The authors declare that they have no relevant or material financial interests that relate to the research described in this paper.
References
 R. J. Martis, U. R. Acharya, A. K. Ray, and C. Chakraborty, “Application of higher order cumulants to ECG signals for the cardiac health diagnosis,” in Proceedings of the 33rd Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBS '11), pp. 1697–1700, September 2011. View at: Publisher Site  Google Scholar
 C. Kamath, “ECG beat classification using features extracted from teager energy functions in time and frequency domains,” IET Signal Processing, vol. 5, no. 6, pp. 575–581, 2011. View at: Publisher Site  Google Scholar
 J. L. CamargoOlivares, R. Clemente, S. HornilloMellado, M. M. Elena, and I. Román, “The maternal abdominal ECG as input to MICA in the fetal ECG extraction problem,” IEEE Signal Processing Letters, vol. 18, no. 3, pp. 161–164, 2011. View at: Publisher Site  Google Scholar
 C. J. Horne, K. J. Zhang, J. Propst, V. K. Murthy, and L. J. Haywood, “Stt segment evaluation by discrete cosine and fourier transforms,” Computers in Cardiology, pp. 265–268, 1984. View at: Google Scholar
 Y. Özbay, R. Ceylan, and B. Karlik, “Integration of type2 fuzzy clustering and wavelet transform in a neural network based ECG classifier,” Expert Systems with Applications, vol. 38, no. 1, pp. 1004–1010, 2011. View at: Publisher Site  Google Scholar
 S. Khoshnoud, M. Teshnehlab, and M. A. Shoorehdeli, “Probabilistic neural network oriented classification methodology for Ischemic Beat detection using multi resolution Wavelet analysis,” in Proceedings of the 17th Iranian Conference of Biomedical Engineering (ICBME '10), pp. 1–4, November 2010. View at: Publisher Site  Google Scholar
 M. Moavenian and H. Khorrami, “A qualitative comparison of Artificial Neural Networks and Support Vector Machines in ECG arrhythmias classification,” Expert Systems with Applications, vol. 37, no. 4, pp. 3088–3093, 2010. View at: Publisher Site  Google Scholar
 N. Maglaveras, T. Stamkopoulos, C. Pappas, and M. Gerassimos Strintzis, “An adaptive backpropagation neural network for realtime ischemia episodes detection: development and performance analysis using the European STT database,” IEEE Transactions on Biomedical Engineering, vol. 45, no. 7, pp. 805–813, 1998. View at: Publisher Site  Google Scholar
 H. Tonekabonipour, A. Emam, M. Teshnelab, and M. A. Shoorehdeli, “Comparison of neurofuzzy approaches with artificial neural networks for the detection of ischemia in ECG signals,” in Proceedings of IEEE International Conference on Systems, Man and Cybernetics (SMC '10), pp. 4045–4048, October 2010. View at: Publisher Site  Google Scholar
 M. Engin, “ECG beat classification using neurofuzzy network,” Pattern Recognition Letters, vol. 25, no. 15, pp. 1715–1722, 2004. View at: Publisher Site  Google Scholar
 P. Langley, E. J. Bowers, and A. Murray, “Principal component analysis as a tool for analyzing beattobeat changes in ECG features: application to ECGderived respiration,” IEEE Transactions on Biomedical Engineering, vol. 57, no. 4, pp. 821–829, 2010. View at: Publisher Site  Google Scholar
 A. Emam, H. Tonekabonipour, and M. Teshnelab, “Applying MLP as a predictor and ANFIS as a classifier in ischemia detection via ECG,” in Proceedings of IEEE International Conference on Systems, Man, and Cybernetics (SMC '11), pp. 2958–2962, October 2011. View at: Publisher Site  Google Scholar
 K. C. Chua, V. Chandran, U. R. Acharya, and C. M. Lim, “Cardiac state diagnosis using higher order spectra of heart rate variability,” Journal of Medical Engineering and Technology, vol. 32, no. 2, pp. 145–155, 2008. View at: Publisher Site  Google Scholar
 M. Engin, M. Fedakar, E. Z. Engin, and M. Korürek, “Feature measurements of ECG beats based on statistical classifiers,” Measurement, vol. 40, no. 910, pp. 904–912, 2007. View at: Publisher Site  Google Scholar
 MITBIH Arrhythmia Database CDROM, HarvardMIT Division of Health Sciences and Technology, 3rd edition, 1997.
 A. Taddei, G. Distante, M. Emdin et al., “The European STT database: standard for evaluating systems for the analysis of STT changes in ambulatory electrocardiography,” European Heart Journal, vol. 13, no. 9, pp. 1164–1172, 1992. View at: Google Scholar
 F. J. Harris, “On the use of windows for harmonic analysis with the discrete Fourier transform,” Proceedings of the IEEE, vol. 66, no. 1, pp. 51–83, 1978. View at: Publisher Site  Google Scholar
 G. Zhou and G. B. Giannakis, “Retrieval of selfcoupled harmonics,” IEEE Transactions on Signal Processing, vol. 43, no. 5, pp. 1173–1186, 1995. View at: Publisher Site  Google Scholar
 S. ElKhafif, Application of higherorder statistics and subspace based techniques to the analysis and diagnosis of electrocardiogram signals [Ph.D. thesis], City University, School of Engineering, 2002.
 R. A. Jacobs, “Increased rates of convergence through learning rate adaptation,” Neural Networks, vol. 1, no. 4, pp. 295–307, 1988. View at: Google Scholar
 J. A. Freeman and D. M. Skapura, Neural Networks: Algorithms, Applications and Programming Techniques, AddisonWesley, Reading, Mass, USA, 1991.
 S. E. Fahlman and C. Lebiere, The Cascade Correlation Architecture, Advances in Neural Information Processing Systems, vol. 2, Morgan Kaufmann, San Mateo, Calif, USA, 1990.
Copyright
Copyright © 2013 Sahar H. ElKhafif and Mohamed A. ElBrawany. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.