This article was published in an Elsevier journal. The attached copy is furnished to the author for non-commercial research and education use, including for instruction at the author’s institution, sharing with colleagues and providing to institution administration. Other uses, including reproduction and distribution, or selling or licensing copies, or posting to personal, institutional or third party websites are prohibited. In most cases authors are permitted to post their version of the article (e.g. in Word or Tex form) to their personal website or institutional repository. Authors requiring further information regarding Elsevier’s archiving and manuscript policies are encouraged to visit: http://www.elsevier.com/copyright http://www.elsevier.com/copyright Author's personal copy Adaptive wavelet network for multiple cardiac arrhythmias recognition Chia-Hung Lin a,b,*, Yi-Chun Du b, Tainsong Chen b a Department of Electrical Engineering, Kao-Yuan University, Kaohsiung, Taiwan b Institute of Biomedical Engineering, National Cheng-Kung University, Tainan, Taiwan Abstract This paper proposes a method for electrocardiogram (ECG) heartbeat detection and recognition using adaptive wavelet network (AWN). The ECG beat recognition can be divided into a sequence of stages, starting with feature extraction from QRS complexes, and then according to characteristic features to identify the cardiac arrhythmias including the supraventricular ectopic beat, bundle branch ectopic beat, and ventricular ectopic beat. The method of ECG beats is a two-subnetwork architecture, Morlet wavelets are used to enhance the features from each heartbeat, and probabilistic neural network (PNN) performs the recognition tasks. The AWN method is used for application in a dynamic environment, with add-in and delete-off features using automatic target adjustment and parameter tuning. The experimental results used from the MIT-BIH arrhythmia database demonstrate the efficiency of the proposed non-invasive method. Compared with conventional multi-layer neural networks, the test results also show accurate discrimination, fast learning, good adaptability, and faster processing time for detection. � 2007 Elsevier Ltd. All rights reserved. Keywords: Electrocardiogram (ECG); Adaptive wavelet network (AWN); Cardiac arrhythmia; Morlet wavelet; Probabilistic neural network (PNN) 1. Introduction Bio-signals on the surface of the human reflect the inter- nal status and electric activity, thus providing information on internal organs with non-invasive measurement such as ECG, echocardiogram, or scintigraphy (Chen, Chen, & Tsai, 1997; Silipo & Marchesi, 1998). ECG has commonly used to collect large amounts of measurements that contain particular information in the signals. The typical diagnostic method is off-line analysis from the recorded data, and using a cardiogram to identify arrhythmic types of the patients. Designing non-invasive tools, abnormal monitor- ing techniques, signal processing, and classification capa- bility for stationary/portable instruments has become an essential task. In addition, further integrating several tech- niques such as data analysis, pattern detection and discri- mination, decision support, and human computer interface is also necessary (Dickhaus & Heinrich, 1996; Qin et al., 2003). To ensure accurate detection, the algorithm requires real-time automatic classification, non-invasive, high- performance computing technique, reliable solutions, and simple for diagnosing disturbances of cardiac rhythm. Diagnostic approaches have been applied to detection with frequency-domain and time-domain techniques. The QRS complex in ECG signals varies with the origination and the conduction path of the activation pulse in the heart- beat. When the activation pulse does not travel through the normal conduction path, the QRS complex becomes wide, and high-frequency components are attenuated. Power spec- tra of individual QRS complex are found at frequencies between 4 Hz and 20 Hz (Minami, Nakajima, & Toyoshima, 1999). With the time-domain technique, various features from each heartbeat are extracted to detect arrhythmia waveforms, such as width, height, area of QRS complex, and QRS morphology, etc. (Osowski & Linh, 2001). Apply- ing these particular features, artificial intelligence (AI) approaches are used to perform ECG beat recognition. Var- ious architectures for artificial neural networks (ANN) are 0957-4174/$ - see front matter � 2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2007.05.008 * Corresponding author. Address: Department of Electrical Engineer- ing, Kao-Yuan University, Kaohsiung, Taiwan. Tel.: +886 7 6077014. E-mail address: eechl53@educities.edu.tw (C.-H. Lin). www.elsevier.com/locate/eswa Available online at www.sciencedirect.com Expert Systems with Applications 34 (2008) 2601–2611 Expert Systems with Applications Author's personal copy used in this research, such as wavelet neural networks (Dick- haus & Heinrich, 1996), back-propagation networks (Ach- arya, Kumar, Bhat, Lim, & Lyengar, 2004; Minami et al., 1999; Silipo & Marchesi, 1998), Fuzzy hybrid neural net- works (Osowski & Linh, 2001; Wang, Zhu, Thakor, & Xu, 2001), self-organizing map network (Hu, Palreddy, & Tompkins, 1997). To develop a diagnostic method for arrhythmia classifi- cation, signal analysis based on wavelet transform (WT) has been presented to extract the characteristics of ECG signals (Dickhaus & Heinrich, 1996; Qin et al., 2003). The wavelet coefficients represent measures of similarity of the local shape of the signal to the mother wavelet under different dilation and translation parameters. This analysis is robust to time-varying signal analysis and it can point out occurrence time, but it is not capable of recognition. With multiresolution and localization of the wavelets (Lin & Wang, 2006) and pattern recognition capability of the ANN, wavelet network (WN) has become important for signal analysis and pattern recognition. When WN is applied in the real word, for example, the morphology vari- ations of ECG waveforms are different for different patients, and even for the same patient or for the same type (Osowski & Linh, 2001), traditional networks can become a bottleneck requiring retraining with new features added into the current database. PNN (Specht et al., 1988) and general regression neural networks (GRNN) (Masters & Land, 1997; Seng et al., 2002) have been presented, and are recognized as having expandable or reducible network structure, fast learning speed, and promising results. In these adaptation methods, the choice of smoothing para- meter has significant effects on the network outcome, and the choice of parameter is usually based on the overall sta- tistical calculation from pre-collected training data. A dynamic model needs a non-statistical method as well as automatic adjustment of the targets and smoothing para- meters for dynamic process technique (Masters & Land, 1997; Seng et al., 2002). In this paper, AWN is proposed to recognize normal beat and six cardiac arrhythmias. The WN consists of two subnetworks connected in cascade. In the wavelet layer, the activation functions take the Morlet wavelets and are responsible for extracting features from each ECG signal. Subsequently, the PNN is an adaptive net- work with automatic tuning parameters and is used to clas- sify cardiac arrhythmias. The results show computational efficiency and accurate recognition. 2. Adaptive wavelet network (AWN) 2.1. Morlet wavelet In applications of signal analysis, it is necessary to extract signal features. Fourier analysis consists of break- ing up a signal into sinusoidal waves of various frequencies, but it is only a time-domain transform, which has no time– frequency localization features. Similarly, wavelet analysis is the breaking up of a signal into dilations and translation versions of the original wavelet, referred to as the mother wavelet. The wavelets must be oscillatory, have amplitudes that quickly decay to zero, and have at least one vanishing moment. The Morlet wavelet is the modulated Gaussian function, the family function is built starting from the fol- lowing complex Gaussian function (Lin & Wang, 2006) wðxÞ¼ ejx0 x � e� x2 0 2 � � e� x2 2r; r > 0: ð1Þ The Fourier transform of w(x) is ŵðxÞ¼ ffiffiffiffiffiffiffiffi 2pr p e �ðx�x0Þ 2 2r � e� x2 0 2 e� x2 2r � � : ð2Þ Let x = 0; then ŵð0Þ¼0, that is R R wðxÞdx ¼ 0, which rep- resents the collection of all measurable functions in the real space, and w(x) satisfies the admissibility condition. When x0 P 5, the appropriate Morlet wavelet becomes uðxÞ¼ ejx0 xe� x2 2r ¼ ½cosðx0xÞþ j sinðx0xÞ�e� x2 2r ¼ uRðxÞþ juIðxÞ; x0 P 5; r > 0; ð3Þ where uR(x) and uI(x) are the real and imaginary part respectively. Morlet wavelet is modulated Gaussian func- tion by cosine. It has a better time–frequency localization feature and smoothes noise interference. When u(x) 2 L 2(R), then mother wavelet becomes the daughter wavelet ud,t(x) with dilation parameter d and translation parameter t, as Eq. (4) ud;tðxÞ¼ uRd;t x � t d � � þ juId;t x � t d � � ; d 2 R nf0g; t 2 R; uRd;tðxÞ¼ cos 5ðx�tÞ d h i e �ðx�tÞ 2 2rd 2 ; uId;tðxÞ¼ sin 5ðx�tÞ d h i e �ðx�tÞ 2 2rd2 : 8>< >: ð4Þ Fig. 1 shows the wavelets with various dilation parameters ðd ¼ 1; 2; 3Þ and translation parameters (t = �1, 0, 1). In this study, both real and imaginary parts of the ud,t(x) can use to extract features from the ECG signals. Real part wavelets are applied to extract the features of normal beat (•) and cardiac arrhythmia disturbances including prema- ture ventricular contraction (V), atrial premature beat (A), right bundle branch block beat (R), left bundle branch block beat (L), paced beat (P), and fusion of paced and normal beat (F). The activation functions of the wavelet nodes are derived from the mother wavelet udi,ti(xi) for i = 1, 2, 3, . . . , n, where n is the number of the wavelet nodes. The input vector X ¼ ½x1; x2; x3; . . . ; xi; . . . ; xn� is con- nected to the WN, and inputs are the sample data from the QRS complexes as shown in Fig. 2. 2.2. Adaptive probabilistic neural network Wavelets hybrid ANN is proposed to detect arrhythmia disturbances, and WN combines the properties of the 2602 C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 Author's personal copy Morlet wavelets with the advantages of PNN. The second subnetwork with hidden, summation, and output layer is shown in Fig. 2. The number of hidden nodes Hk ðk ¼ 1; 2; 3; . . . ; KÞ is equal to the number of training exam- ples, while the number of summation nodes Sj and output nodes Oj ðj ¼ 1; 2; 3; . . . ; mÞ equals to the types of distur- bances. The weights wWHki (connecting the kth hidden node and the ith wavelet node) and wHSjk (connecting the jth sum- mation node and the kth hidden node) are determined by K input–output training pairs. The final output of node Oj is (Masters & Land, 1997; Seng et al., 2002) H k ¼ exp � XK k¼1 ðuiðxiÞ� wWHki Þ 2 2r2k " # ; ð5Þ OjðuÞ¼ PK k¼1w HS jk H kPK k¼1H k ¼ sðuÞ hðuÞ ; ð6Þ where r1 ¼ r2 ¼ �� � ¼ rk ¼ �� � ¼ rK . However, there are no means of generating an optimal smoothing parameter rk, and adjusting the rk would refine the accuracy in the dynamic environment. The optimal parameter rk is in- tended to minimize the object function, which is defined as squared error function ej (Masters & Land, 1997) ejðu; TÞ¼ ½T j � OjðuÞ� 2 ; ð7Þ where Tj is the desired output for input vector X, and the implicit constraint is rk 5 0. The first partial derivatives of error are shown in Eq. (8) �oejðu; TÞ ork ¼ 2 T j � OjðuÞ oOjðuÞ ork ¼ 2 T j � OjðuÞ osðuÞ ork � OjðuÞ ohðuÞork hðuÞ " # ; ð8Þ osðuÞ ork ¼ 2 XK k¼1 wHSjk H k " # ðuiðxiÞ� wWHki Þ 2 2r3k " # ; ð9Þ ohðuÞ ork ¼ 2 XK k¼1 H k " # ðuiðxiÞ� wWHki Þ 2 2r3k " # : ð10Þ Fig. 1. The wavelets with various dilations and translations. Wavelet Nodes x 1 x2 x n-1 x n . . . . . . x i . . . . . . . . . 1ϕ ϕ 2 1nϕ nϕ H 1 H k H K S1 S 2 S m . . . iϕ O1 O 2 O m kH . . . . . . weight=1Hidden Nodes Summation Nodes Output Nodes Tune Smoothing Parameters Desired Output Error Signal ECG Signal ∑ ∑ Fig. 2. Architecture of the adaptive wavelet network. C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 2603 Author's personal copy The gradient method is used to update parameter rk with iteration process, as in Eq. (11) rkðp þ 1Þ¼ rkðpÞþ g oejðu; TÞ ork ; ð11Þ where g is the learning rate, and p is the iteration number. In this study, AWN based algorithm contains two stages: the learning stage and recalling stage, as detailed below (Lin & Wang, 2006). 2.2.1. Learning stage Step (1) For each training example XðkÞ¼ ½x1ðkÞ; x2ðkÞ; . . . ; xiðkÞ; . . . ; xnðkÞ� for k ¼ 1; 2; 3; . . . ; K, and i ¼ 1; 2; 3; . . . ; n, create weights wWHki between wavelet node ui and hidden node Hk by uiðkÞ¼ cos 5ðxiðkÞ�tiÞ d i h i e �ðxiðkÞ�tiÞ 2 2rd2 i xi ¼ V ðiÞ; ti ¼ V norðiÞ 8>< >: ; ð12Þ wWHki ¼ uiðkÞ; ð13Þ where di is the dilation parameters, di 2 Z; xi is a se- quence of samples obtained from the QRS complex of unknown signal V; ti is the translation parameters, a se- quence of samples obtained from the QRS complex of normal beat Vnor; n is the number of sampling points; and WWH = [wWHki ] is a k by n matrix. Step (2) Create weights wHSjk between hidden node Hk and summation node Oj by wHSjk ¼ 1 0 � ðj ¼ 1; 2; 3; . . . ; mÞ; ð14Þ where the values of wHSjk are the predicted outputs asso- ciated with each stored pattern wWHki , and W HS = [wHSjk ] is k by m matrix. Connection weights from hidden nodes Hk to summation node P are set 1. 2.2.2. Recalling stage Step (1) Get network weights wWHki and w HS jk . Step (2) Apply test vector X ¼ ½x1; x2; x3; . . . ; xi; . . . ; xn� to the AWN. Compute the output of wavelet node ui uiðxiÞ¼ cos 5ðxi � tiÞ d i � � e �ðxi�tiÞ 2 2rd2 i ð15Þ Step (3) Compute the output of hidden node Hk by using Eq. (5). The optimal value rk can be obtained by using Eqs. (8)–(11) based on minimum misclassifi- cation error (Convergent Condition: Infinity Norm). Step (4) Compute the outputs of node Oj by using the Eq. (6). 3. Cardiac arrhythmias detection procedure 3.1. ECG characteristic and feature extraction An ECG signal represents the changes in electrical potential during the heartbeat as recorded with non-inva- sive electrodes on the limbs and chest; a typical ECG signal consists of the P-wave, QRS complex, and T-waves. The P- wave is the result of slow-moving depolarization of the atria. The rapid depolarization of the ventricles results in the QRS complex of the ECG, which is a sharp wave about 1 mV amplitude and 80–100 ms duration. The plateau part of the action potential after QRS is called the ST segment (Silipo & Marchesi, 1998). The ECG waveform is the result of the potential change that propagates within the heart (electrical activity) and causes the cardiac muscle contrac- tion, even varying with rhythm origin and conduction path. For example, when the activation pulse originates in the atrium and travels through the normal conduction path, the QRS complex has a sharp and narrow deflection, or else the QRS complex becomes wide and distorted (Minami et al., 1999). In the time domain, the normal beat and typ- ical arrhythmia heartbeats are normalized as shown in Fig. 3. Each ECG signal has various morphological infor- mation and features, which can be used to classify seven categories. The QRS complex of the ECG is important information in heart-rate monitoring and cardiac diseases diagnosis. The R-waves are detected by a peak detection algorithm, which begins by scanning for local maxima in the absolute value of ECG data. For certain window duration, the searching continues to look for a larger value. If this search finishes without finding a larger maximum, the current maximum is assigned as the R peak (Minami et al., 1999). Centered on the detected R peak, the QRS complex portion is extracted by applying a window of 280 ms, and P-wave and T-wave are excluded by this window duration. Based on 360 sampling rate, 100 samples can be acquired around the R peak (Sampling point n = 100, 50 points before and 50 points after). After sampling and performing analog-to-digital conversion, individual QRS complexes are extracted. The real part of wavelets uRd,t(xi), d = 3, i = 1, 2, 3, . . ., 100, as Eq. (12), are responsible for extract- ing features under low frequency analysis, and these fea- tures are reconstructed by 100 wavelet nodes to form the symptomatic patterns, as shown in Fig. 4. For example, the symptomatic pattern of a normal beat has a near rectangular-impulse-sequence graph with amplitude one. The morphology of symptomatic patterns will reveal the serious dip and bumpy shapes for abnormal heartbeats. Symptomatic patterns of the same categories have similar morphology or multiform. The amplitudes having a spe- cific dip range can be observed between zero and one in the rectangular section. According to the morphology, various patterns indicate different cardiac diseases. These symptomatic patterns are considered for training the AWN. 2604 C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 Author's personal copy 3.2. Training patterns creation In this study, the dataset of QRS complexes typically for seven categories are taken from the MIT-BIH arrhythmias database (from Record 100 to Record 234) (Goldberger et al., 2000). The database contains 48 records, and each record is slightly over 30 min long. In most records, the upper signal is a modified limb lead II (ML II) and the lower signal is a modified lead V1 (VI). Seven heartbeat classes have been included in the investigations, involving normal beat, supraventricular ectopic beat, bundle branch ectopic beat, and ventricular ectopic beat as shown in Table 1 (Chazal, Dwyer, & Reilly, 2004). A total of 43 QRS complexes (ML II Signal) are selected including patient numbers 107, 109, 111, 118, 119, 124, 200, 209, 212, 214, 217, 221, 231, 232, and 233, and the templates of seven classes are produced by Eqs. (12) and (13). The numbers of symptomatic patterns from the same class are 7-, 11-, 2-, 7-, 8-, 6-, and 2-set data (Knor = 7, KV = 11, KA = 2, KL = 7, KR = 8, KP = 6, KF = 2) respectively. Because the characteristics are enhanced, the number of training data requirements can be reduced. We can system- atically create weights between wavelet nodes and hidden nodes with 43-set training data, k ¼ 1; 2; 3; . . . ; 43. The weights between hidden nodes and summation nodes are encoded as binary values by Eq. (14) with signal ‘‘1’’ for belonging to Class j, j ¼ 1; 2; 3; . . . ; 7. The AWN contains 100 wavelet nodes, 43 hidden nodes, eight summation nodes, and seven output nodes. The num- ber of wavelet nodes is equal to the number of the sampling points, the number of hidden nodes is equal to the number of training data, and each output represents one normal beat and six types of arrhythmias as defining output vector O = [O1, O2, O3, O4, O5, O6, O7] = [ONor, OV, OA, OL, OR, OP, OF]. The selection sort is applied to find the maximum value that indicates the arrhythmic type. The output values are between 0 and 1, where a value close to 1 means ‘‘Nor- mal’’, and close to 0 means ‘‘Abnormal’’. If clinicians pro- vide some suggestion or more patterns are generated in clinical investigation, training data can be continually added to the current database. The database can be enhanced at any time with new training data. The corre- sponding hidden nodes will continue to grow, and will update the network weights without re-iteration to corrupt Fig. 3. Typical arrhythmia heartbeats in time domain (Lead II signal). C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 2605 Author's personal copy the previous database or weights. This process results in very fast training, and the network is adaptive to data changes by tuning smoothing parameters. 4. Experiment result The proposed detection algorithm was developed on a PC Pentium-IV 2.4 GHz with 480 MB RAM and Matlab workspace, based on the MIT-BIH arrhythmias records. The performance of the proposed model was tested with learning performance for the training data and detection accuracy for the untrained data, as detailed below. 4.1. Single cardiac arrhythmia with noise influence In ECG measurement, signals may be disturbed by noise such as power line interference (Minami et al., 1999) or quantification error (Gaussian noises). The ECG signal sometimes is disturbed by 50 Hz or 60 Hz interference whose amplitude is approximately 5–6 times less than the R-peak, as Fig. 5a shows the ECG signals of normal heart- beat and V in the time domain, and Fig. 5b shows the ECG signals with 60 Hz noise influences. Using 100 heartbeats (about 1.5 min long) of the patient numbers 119, 200, and 212 (Goldberger et al., 2000) containing normal beats, pat- tern Vs, and pattern Rs, the results show that high accura- cies of the proposed algorithm, as shown in Table 2. Test 1 shows the test results without any noise, and Test 2 shows the results with presenting ECG signals involving 60 Hz interference. The proposed method is robust enough to han- dle noisy environments. Overall accuracies are greater than 90%. The positive predictivity of more than 80% is obtained to quantify the performance of proposed method with or without a noisy background. It can be seen that the features of heartbeats are still strong enough to recognize, and the symptomatic patterns are not corrupted by noise influences as shown in Fig. 6. When the symptomatic patterns have Fig. 4. Various symptomatic patterns in time–frequency domain. 2606 C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 Author's personal copy morphological variation or sag shapes, the critical times for starting and ending of occurrences are clearly noted, and the number of abnormal beats is easy to count. This study case confirms that the proposed method can work in an uncertain environment with a noisy background. 4.2. Multiple cardiac arrhythmias Some of the clinical cases include multiple cardiac arrhythmias, for example ventricular ectopic beat, bundle branch ectopic beat, fusion, and paced beats. Using 100 heartbeats of the patient numbers 217, 214, and 118 includ- ing multiple cardiac arrhythmias (Masters & Land, 1997), Table 1 Heartbeat types of human ECG data Class Beat Symbol Record Patient Normal Normal beat • MIT-100 Male, age 69 MIT-103 Male, age * MIT-119 Female, age 51 MIT-200 Male, age 64 MIT-209 Male, age 62 MIT-212 Female, age 32 MIT-221 Male, age 83 Ventricular ectopic beat Ventricular premature contraction V MIT-119 Female, age 51 MIT-200 Male, age 64 MIT-221 Male, age 83 MIT-233 Male, age 57 Supraventricular ectopic beat Atrium premature beat A MIT-202 Male, age 68 MIT-232 Female, age 76 Bundle branch ectopic beat Left bundle branch block beat L MIT-109 Female, age 64 MIT-111 Female, age 47 MIT-207 Female, age 89 MIT-214 Male, age 53 Right bundle branch block beat R MIT-118 Male, age 69 MIT-124 Male, age 77 MIT-212 Female, age 32 MIT-231 Female, age 72 Unknown Paced beat P MIT-107 Male, age 63 MIT-217 Male, age 65 Fusion beat Fusion of paced and normal beat F MIT-217 Male, age 65 Note: *: Not recorded. Fig. 5. ECG signals in time domain (Record 119) (a) ECG signals of normal beat and V; (b) ECG signals of normal beat and V with 60 Hz power line interference. Table 2 The test results of single cardiac arrhythmias Record Number of arrhythmias CPU time (s) Accuracya (%)• V A L R P F 119 Actual 75 25 0 0 0 0 0 – – Test1 75 25 0 0 0 0 0 0.096 100 Test2 75 25 0 0 0 0 0 0.105 100 200 Actual 62 38 0 0 0 0 0 – – Test1 62 35 0 1 2 0 0 0.109 97 Test2 62 35 0 1 2 0 0 0.156 97 212 Actual 5 0 0 0 95 0 0 – – Test1 9 0 0 0 91 0 0 0.109 96 Test2 9 0 0 0 91 0 0 0.110 96 a Accuracy (%) = (Nr/Nt) · 100%; Nr: the number of correctly discri- minated beats; Nt: total number of heartbeats. C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 2607 Author's personal copy Test 1 and Test 2 show that the accuracies are greater than 90%, as shown in Table 3. The results confirm that the major types are paced beat (P), left bundle branch beat (L), and right bundle branch beat (R). Fig. 7 shows the traced detection results of patient number 118 and appears six misclassification errors (�) of class R in the output OR. The processes recognized 94 paced beats with six fail- ures, 95 left bundle branch ectopic beats with four failures, and 99 right bundle branch ectopic beats with six failures, respectively. The positive predictivity of more than 80% is also obtained to quantify the performance with or without a noisy background. Second study case confirms that the proposed method can detect multiple cardiac arrhythmias with high confidence. Fig. 6. Symptomatic patterns in time–frequency domain (a) symptomatic patterns of normal beat and V; (b) symptomatic patterns of normal beat and V with 60 Hz power line interference. Table 3 The test results of multiple cardiac arrhythmias Record Number of arrhythmias CPU time (s) Accuracya (%)• V A L R P F 217 Actual 0 3 0 0 0 94 3 – 94 Test 0 4 0 0 1 88 7 0.113 214 Actual 0 5 0 95 0 0 0 – 96 Test 1 5 3 91 0 0 0 0.108 118 Actual 0 1 0 0 99 0 0 – 94 Test 4 1 0 2 93 0 0 0.111 a Accuracy (%) = (Nr/Nt) · 100%; Nr: the number of correctly discri- minated beats; Nt: total number of heartbeats. Fig. 7. Detection results of patient number 118. Note: �: Error. 2608 C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 Author's personal copy 4.3. Learning performance tests Figs. 8a and b show the squared errors and smoothing parameters versus learning cycles, respectively. The perfor- mance of AWN is affected by the width of the Gaussian activation function. As the width of Gaussian function decreases, decision boundaries can become increasingly nonlinear. For a very narrow Gaussian function, the net- work approaches a nearest-neighbor classifier (Lin & Tsao, 2005; Lin & Wang, 2006). Eqs. (8)–(11) are used to find near-optimum smoothing parameters that minimize the training-data error of the AWN as the number of training data increases from K1=18 to K6=43. The corresponding hidden nodes will continue to grow from 18 to 43, and con- struct the network weights without any iteration process. This process results in very fast training, and the network is adaptive to match desired output with add-in/delete-off training patterns by tuning smoothing parameters for six learning stages. Learning rates g = 0.1–0.3 are selected for training AWN as shown in Table 4. Fig. 8 shows the final squared errors after the training AWN has been responsible for the determining smoothing parameters. For the convergent condition e 6 10�3, AWN rapidly con- verges to the nearest local minimum for less than 40 learn- ing cycles in a shorter processing time. It takes 0.782 s (Average CPU Time) to classify the 43 training data into seven categories. The output values of AWN are shown in Fig. 9a. AWN automatically adjusts outputs to approach the targets with tuning smoothing parameters in the learning stages. Threshold value 0.5 is used to separate ‘‘Normal’’ from ‘‘Abnormal’’, and can correctly discriminate. The proposed method has the advantages of fast learning process, learn- ing stage with slight iteration for updating weights, and adaptation capability. However, the performance is affected by the parameter of Gaussian activation function. For 43 trained data and 1200 untrained data including sin- gle and multiple cardiac arrhythmias, the ranges of param- eters could be determined by experience and trial-and-error procedure with tuning parameters. The detection accuracy decreases as smoothing parameters increase. The choice of parameters will affect the estimation error, and the suitable range is from 0.05 to 0.30 for reducing misclassification errors, and the accuracies are greater than 90% as shown in Fig. 9b. Refining the parameters can enhance the detec- tion accuracy by using the proposed optimum method. The near-optimal parameter r = 0.078 can minimize the classi- fication error, and the accuracies are the maximums for single and multiple cardiac arrhythmias, as shown in Fig. 9b. For comparison purposes, we have also applied the WBPN composed of 100 wavelet nodes in the wavelet layer and multi-layer neural network (MLNN). For the second subnetwork, a MLNN is used for training with the back- propagation learning algorithm. Only one hidden layer is used, and the number of hidden nodes is determined by the experience formulas as shown in Table 4. Traditional MLNN has some limitations including very slow learning process, needs iteration for determining weights and learn- ing rates (g = 0.2–0.8), and needs to determine the network architecture such as the number of hidden layers and hid- den nodes, which is difficult to retrain with new training data. With various tests, we can see that the training time of AWN outperformed WBPN. AWN has a fast learning process needing no iteration for updating weights, a flexible hidden nodes mechanism with add-in or delete-off, and automatic adjustment of the targets and parameter r. With the same training data, the proposed AWN shows better performance than WBPN as shown in Table 4. Table 4 Comparison of AWN with WBPN Method Network topology Training patterns Learning rate g Learning cycles Average CPU time (s) *AWN 100-43-8-7 43 0.1–03 640 0.782 WBPN 100-100-27-7 43 0.2–0.8 <10000 <800 100-100-54-7 100-100-107-7 Note: (1) NH = (NI + NO) 1/2; (2) NH = (NI + NO)/2; (3) NH = (NI + NO). NH: the number of hidden node; NI: the number of input node; NO: the number of output node. 0 1 2 3 4 0 10 20 30 40 K1 K2 K3 K4 K5 K6 Learning Cycle S qu ar ed E rr or 0 10 20 30 40 0 0.2 0.4 0.6 0.8 1 K1 K2 K3 K4 K5 K6 Learning Cycles S m oo th in g P ar am et er Fig. 8. (a) Squared errors versus learning cycles, (b) smoothing param- eters versus learning cycles. Note: K1 ¼ K nor þ K V ¼ 18; K2 ¼ K1 þ K A ¼ 20; K3 ¼ K2þK L ¼ 27; K4 ¼ K3þK R ¼ 35; K5 ¼ K4þK P ¼ 41; K6 ¼ K5þ K F ¼ 43. C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 2609 Author's personal copy 5. Conclusion The diagnostic procedure based on WT and PNN has been presented to recognize cardiac arrhythmias. For ECG signals, classifier based on AWN is proposed to rec- ognize normal beat, premature ventricular contraction, atrial premature beat, right/left bundle branch block beat, paced beat, and fusion of paced and normal beat. The wavelets act to extract and enhance the features from QRS complexes in the time domain. These features are slightly affected by noise influences. Subsequently, PNN can classify the applied input pattern with/without a noisy background. The AWN model can also work in a dynamic environment with continuity add-in/delete-off features by automatically tuning the targets and smoothing parameters of hidden nodes. For both trained and untrained data, the results demonstrate the efficiency of the proposed method. Compared with the MLNNs, AWN can be built using adaptive training algorithms, and can avoid the determina- tion of network weights by the trial-and-error procedure. Test results show accurate diagnosis, fast learning, good adaptability, and faster processing time for detection. With this model, special features can be further added to the cur- rent database such as ventricular bigeminy (B), ventricular trigeminy (V), ventricular tachycardia (VT), normal sinus rhythm (N), etc. Thus, the database is always enhancible with new symptomatic patterns. The AWN can adapt itself in a new environment by adding features, and also promise the high confidence value of detection results with special features considering. The proposed method can be used as an aided tool for heartbeat recognition, and be inte- grated in the monitoring device. Acknowledgement This work is supported in part by the National Science Council of Taiwan under Contract Number: NSC 93- 2614-E-244-001 (December 1 2004–July 31 2005). References Acharya, R., Kumar, U. A., Bhat, P. S., Lim, C. M., & Lyengar, S. S. (2004). Classification of cardiac abnormalities using heart rate signals. Medical and Biological Engineering and Computing, 42(3), 288–293. Chazal, Philip de, Dwyer, Maraia O’, & Reilly, Richard B. (2004). Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Transactions on Biomedical Engi- neering, 51(7), 1196–1206. Chen, Tain-Song, Chen, Tzu-Pei, & Tsai, Liang-Min (1997). Computer- ized quantification analysis of left ventricular wall motion from echocardiograms. Ultrasonic Imaging, 19, 1–9. Dickhaus, Hartmut, & Heinrich, Hartmut (1996). Classifying biosignals with wavelet networks – A method for noninvasive diagnosis. IEEE Engineering in Medicine and Biology(September/October), 103–111. Goldberger, A.L., Amaral, L.A.N., Glass, L., Hausdorff, J.M., lvanov, P.Ch., Mark, R.G., et al. (2000) PhysioBank, Physio Toolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic signals. Circulation 101 (23), e215–e220 [Circulation electronic Pages; http://circ/cgi/content/full/101/23/e215]; (June 13). 0 0.2 0.4 0.6 0.8 1 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 Nor V A L R P F Threshold value = 0.5 0% 20% 40% 60% 80% 100% 0.01 0.05 0.078 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Single Cardiac Arrhythmia Multiple Cardiac Arrhythmias Smoothing parametersSmoothing parameters Optimal ParameterOptimal Parameter A cc ur ac y A cc ur ac y Accuracy The number of training data O ut pu t V al ue Fig. 9. (a) Output target values of the AWN, (b) detection accuracies versus smoothing parameters. 2610 C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 Author's personal copy Hu, Y.-H., Palreddy, S., & Tompkins, W. (1997). A patient adaptable ECG beat classifier using a maxture of experts approach. IEEE Transactions on Biomedical Engineering, 44(September), 891–900. Lin, Chia-Hung, & Tsao, Ming-Chieh (2005). Power quality detection with classification enhancible wavelet-probabilistic network in a power system. IEE Proceedings-Generation, Transmission, and Distribution, 152(6), 969–976. Lin, Chia-Hung, & Wang, Chia-Hao (2006). Adaptive wavelet networks for power quality detection and discrimination in a power system. IEEE Transactions on Power Delivery, 21(3), 1106–1113. Masters, Timothy, & Land, Walker (1997). A new training algorithm for the general regression neural network. 1997 IEEE international conference on computational cybernetics and simulation, 3, 1990–1994, 12–15 October. Minami, Kei-ichiro, Nakajima, Hiroshi, & Toyoshima, Takesshi (1999). Real-time discrimination of ventricular tachyarrhythmia with fourier- transform neural network. IEEE Transactions on Biomedical Engi- neering, 46(2), 179–185. Osowski, Stanislaw, & Linh, Tran Hoai (2001). ECG beat recognition using fuzzy hybrid neural network. IEEE Transactions on Biomedical Engineering, 48(11), 1265–1271. Qin, Shuren, Ji, Zhong, Zhu, Hongjun (2003). The ECG recording analysis instrumentation based on virtual instrument technology and continuous wavelet transform. In Proceedings of the 25th annual international conference of the IEEE EMBS Cancun, Mexico, Septem- ber 17–21 (pp. 3176–3179). Seng, Teo Lian, Khalid, Marzuki, Tusof, Rubiyah (2002) Adaptive GRNN for the Modeling of Dynamic Plants. In Proc. of the 2002 IEEE International Symposium on Intelligent Control Vancouver, Canada, October 27–30 (pp. 217–222). Silipo, Rosaria, & Marchesi, Carlo (1998). Artificial neural networks for automatic ECG analysis. IEEE Transactions on Signal Processing, 46(5), 1417–1425. Specht, Donald F. (1988). Probabilistic neural network for classification mapping, or associative memory. In Proc. IEEE Int. Conf. Neural network, San Diego, CA, Vol. 1 (pp. 525–532), July. Wang, Yang, Zhu, Yi-Sheng, Thakor, Nitish V., & Xu, Yu-Hong (2001). A short-time multifractal approach for arrhythmias detection based on fuzzy neural network. IEEE Transactions on Biomedical Engineering, 48(9), 989–995. C.-H. Lin et al. / Expert Systems with Applications 34 (2008) 2601–2611 2611