Mathematical and Computer Modelling 54 (2011) 1644–1649
Contents lists available at ScienceDirect
Mathematical and Computer Modelling journal homepage: www.elsevier.com/locate/mcm
A computational framework based on behavioural modelling: Application to the matching of electrocardiogram (ECG) recordings María Teresa Signes ∗ , Higinio Mora, Juan Manuel García Departamento de Tecnología Informática y Computación, University of Alicante, 03690, San Vicente del Raspeig, Alicante, Spain
article
info
Article history: Received 14 October 2010 Received in revised form 10 January 2011 Accepted 12 January 2011 Keywords: Acute myocardial infarction (AMI) Behavioural pattern Function approximation Recursive calculation
abstract We present a computational framework to aid in cardiovascular disease diagnosis. Our method defines a set of standard behaviours obtained by the recursive calculation of a parameterized formula, and these behaviours are used to match the electrocardiogram (ECG) recording. The advantage of this proposal is the capability to extract from the huge set of numerical values of the ECGs a characteristic reduced pattern with behavioural meaning which allows more accurate and easy matching with unknown ECGs in order to diagnose the patients. © 2011 Elsevier Ltd. All rights reserved.
1. Introduction The electrocardiogram (ECG) signal is an important and commonly used aid in cardiovascular disease diagnosis because it provides key information about the electrical activity of the heart. Many disturbances in the heart performance show variations in the waveform shapes and can be used to diagnose the disease. It is important to remember that the 12-lead ECG provides spatial information about the heart’s electrical activity in three orthogonal directions: right/left, superior/inferior, anterior/posterior. To detect abnormal ECG signals, continuous monitoring is required by physicians. Several methods for automated arrhythmia detection have been developed to simplify the huge monitoring task due to the large number of patients in intensive care units as well as to reduce the diagnostic inefficiency caused by inaccuracies in visual inspection. Many well-known techniques are based on descriptive parameters of the wave shape, such as the segments and curves [1–3], and on frequency or time–frequency features, such as dynamic time warping [4,5] or wavelet transforms [6]. Other recent approaches can generate realistic synthetic ECG signals by means of ordinary differential equations (ODEs) and may be employed to assess biomedical signal processing techniques which are used to compute clinical statistics from the ECG [7,8]. Linear discriminant methods such as Karhunen–Loewe basis functions [9] or decomposition into Hermite basis functions [10] can be used to represent the QRS complex and part of the ST complex. These approaches may also involve artificial intelligence techniques such as artificial neural networks or fuzzy logics [10,11]. Proposals combining different techniques succeed in improving the classification results [5,12–19]. Polynomial fitting or spline interpolation is used to remove base line wander, i.e. a low-frequency activity in the ECG which may interfere with the signal analysis, rendering clinical interpretation inaccurate and misleading [20–23]. Usually, this method has a growing computational complexity as the order of the polynomials increases. Nevertheless, in [23], the polynomial distance measurement is used to implement an ECG-based biometric system. The authors claim their method is speedy, area saving and accurate compared with other well-known algorithms. Finally, we have to mention intelligent-agent-based techniques because they provide a structure that can combine not only data types but also a variety of reasoning methodologies in the same decision support system [24,25].
∗
Corresponding author. Tel.: +34 96 590 3400; fax: +34 96 590 3464. E-mail addresses:
[email protected] (M.T. Signes),
[email protected] (H. Mora),
[email protected] (J.M. García). URL: http://www.ua.es/i2rc/index2-eng.html (M.T. Signes, H. Mora, J.M. García).
0895-7177/$ – see front matter © 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.mcm.2011.01.021
M.T. Signes et al. / Mathematical and Computer Modelling 54 (2011) 1644–1649
1645
Fig. 1. Set of 11 elementary behaviours plotted versus iteration number.
The comparison between methods is sometimes difficult because published works differ in both the purposes and the presentation of the results. Whereas accuracy measures are crucial to the biometrics field for identification and authentication uses, for clinical needs the sensitivity and specificity are more suitable measures for ECG classification [19]. While the accuracy evaluates the formal correctness of the methods, the sensitivity and the specificity evaluate the methods from a clinical point of view and say how successful the method is in diagnosing healthy or ill people by detecting the proportions of true/false-positive and true/false-negative cases. In this paper, we develop a new proposal for ECG matching in order to improve the false-positive and false-negative statistics. Our method consists of modelling normal and abnormal ECGs by means of a set of elementary standard behaviours (shapes). The algebraic formalization is based on a recursive weighted formula which can generate, by successive iteration, a set of values which define the standard behaviours. The weighting parameter values of the formula determine the intervals of stability of the elementary behaviours and provide a characteristic reduced pattern with behavioural meaning. This approach has already been successfully tested to emulate neuron spiking [26]. The organisation of this paper is as follows. Following this introduction, Section 2 presents the algebraic formalisation of the model and plots the 11 standard behaviours; the stability interval of the behaviours is analysed. Section 3 details the application of the method to the matching of normal and abnormal ECGs. Section 4 presents some preliminary experimental results related to the count of false negatives and true positives and the estimation of the sensitivity. Section 5 summarizes and presents concluding remarks. 2. Algebraic formalization of the behavioural modelling Let F = {F0 , F1 , . . . , Fn } be a sequence of real values that can be generated by Eq. (1). The first value, F0 , is given, as well as the sequence G = {Gi } and the pair (α, β). All the Fi values are calculated by iterative application of the recursive equation. F0 ∈ R, Fi+1 = α Fi + β Gi ,
∀i,
(1)
i ∈ N, (Fi , Gi ) ∈ R , (α, β) ∈ R . 2
2
It can be noticed that F0 , (α, β) and the set G = {Gi } are the crucial parameters for the generation of the behaviour F . For the particular case (∀i ∈ N, Gi = 1), a set of 11 standard elementary behaviours is obtained; see Fig. 1. An exhaustive analysis has been done to study the stability intervals of these behaviours when the parameters F0 , (α, β) vary; see Fig. 2.
1646
M.T. Signes et al. / Mathematical and Computer Modelling 54 (2011) 1644–1649
Fig. 2. Definition of the stability intervals of the elementary behaviours as functions of F0 and (α, β).
Fig. 3. A normal ECG structure, voltage and times.
The capabilities of a behaviour F to match a given function Ψ can be measured by the correlation between the sequences of values {Fi } and {Ψ (i)}, a sampling function of Ψ . The accomplishment of the mapping implies some conditions to be fulfilled. If the independent variable for function Ψ is denoted x + ih (where x is the initial real value, i ∈ N can take successive increasing values, and h stands for the iteration step), the conditions are as follows. (a) x (initial Ψ value) is mapped to 0 (index of F ); that is to say, Ψ (x) ≡ F0 . (b) The successive samples of function Ψ are mapped to successive Fi irrespective of the value of h. (c) The two previous assumptions allow not having to discern between i (index belonging to the independent variable of function Ψ ) and i (iteration number for function F ); that is to say, Ψ (x + i · h) ≡ Ψ (i) = Fi . 3. Application to the matching of ECG recordings We now perform the matching of a normal ECG waveform in lead I by a set of standard behaviours. The structure, true voltages, and time intervals of a normal ECG taken from the literature are shown in Fig. 3. The fitting procedure involves first taking some reference values (red points) that are selected by visual inspection and are of physiological significance, and then setting arbitrarily both the initial voltage value of the model to 0 and the iteration step, h, to 0.001 s. This value allows an easy equivalence between the timing count extracted from the MIT-BIH arrhythmia database and the number of iterations, which is carried out by multiplying the true times in seconds by 1000. The recursive formula is then applied locally inside the intervals determined by the red points. Fig. 4 represents the waveform modelled by the recursive formula (modelled voltage versus number of iterations). Table 1 summarizes the values of the parameters (α, β) that match the plotted data of the ECG as well as the identification number of the corresponding local behaviour (from the classification of Fig. 2). The accuracy of the matching is 3 × 10−2 , which is better than the 10% suggested by physicians. The values (α, β) are not necessarily unique: they need only provide a suitable fitting of the interval which is the means to point to a particular behaviour. This tolerance is compatible with the purpose of the method, which is to model ECGs in terms of behaviours, not to match a biological signal ‘‘exactly’’. The advantage of our method is the capability to extract from the set of numerical values of the ECGs a characteristic reduced but sufficient pattern with behavioural meaning. As shown in the fourth column of Table 1, the normal ECG (A) is defined by a pattern which is an ordered sequence of pairs (behaviour number, iteration interval).
M.T. Signes et al. / Mathematical and Computer Modelling 54 (2011) 1644–1649
1647
A- Normal ECG modelled by the recursive formula mV
1.2 1 0.8 0.6 0.4 0.2 0 -0.2
0
100
200
300
400
500
600
-0.4 iterations
Fig. 4. Normal ECG modelled by the recursive formula. Table 1 Modelling parameters for the normal ECG (A) and their corresponding behaviour numbers. Iteration number
α
β
Behaviour number
0–35 35–70 70–110 110–130 130–150 150–170 170–200 200–310 310–410 410–490 490–570
0.93 1.01 1 0.90 0.8 0.89 0.98 1 0.97 1.01 1
0.012 −0.0053 0 −0.011 0.21 −0.05 0.0075 0 0.01 −0.0057 0
3 5 11 4 3 4 (*) 3 (*) 11 (*) 3 (*) 5 (*) 11 (*)
Pattern (A) = {(3, 35), (5, 35), (11, 40), (4, 20), (3, 20), (4, 20), (3, 30), (11, 110), (3, 100), (5, 80), (11, 80)}. The asterisks indicate the behaviours we will take into account in the experiment; see the next section. 4. Towards the recognition of cardiac disease Our current research focuses on acute myocardial infarction (AMI) as the disease we are interested in, and we pursue detecting the alterations it causes in a normal ECG in order to define them by the variation of the normal pattern (A). Although we have not yet reached definitive conclusions, we think that it would be interesting to summarize some initial results. An AMI is due to the abrupt reduction or cut off of myocardial blood supply in a region of the heart. This causes a sequence of injurious events reflected by the ECG changes that usually follow a well-known scheme depending on the location and size of the AMI. In general, the greater the number of leads of the 12-lead ECG with AMI changes (Q waves and ST elevation) the larger the infarction size and the worse the prognosis. Fig. 5 presents five very characteristic pathological changes (B, C, D, E, F) that may be observed (perhaps not all together) in the ECG evolution during an AMI (A is the normal ECG, prior to AMI). Fig. 6 shows the five changes approximated by our method. As for the normal ECG (A), all the changes have their own characteristic pattern, but this consideration falls outside the purpose of the present paper. Our initial experiment consists of comparing our standardized values of pattern (A) with the true ECGs data extracted from the freely available MIT-BIH arrhythmia database http://www.physionet.org/physiobank/. We have studied the ECGs (lead I) of 294 patients; all them suffered AMI. We estimate the specificity and the sensitivity of our model as follows. Specificity =
TN , TN+FP
Sensitivity =
TP , TP+FN
where
TP = ‘‘true positives’’ (correctly classified as abnormal) TN = ‘‘true negatives’’ (correctly classified as normal) FP = ‘‘false positives’’ (incorrectly classified as abnormal) FN = ‘‘false negatives’’ (incorrectly classified as normal). In order to obtain the FN and TP counts, the comparison was performed by calculating the correlation between the sequences of voltage values of each patient’s ECG and the corresponding sequences of voltage values of our model for the normal ECG (A). For each case we performed six local comparisons (marked by asterisks in Table 1), that is, one per behaviour. The five initial behaviours before iteration number 150 were not tested because they correspond to the QRS complex which is shared by all ECGs, as shown in Fig. 5. We set three values for the correlation coefficient, r ≥ 0.5, r ≥ 0.75, and r ≥ 0.95, and we considered as healthy (FN) a person whose ECG presents a correlation only with the normal pattern (A) in at least four out of the six tested behaviours. We have considered as ill (TP) a person whose ECG presents correlations with any abnormal (B, C, D, E, F) pattern. The results are shown in Table 2. All the calculations were performed by using Matlab.
1648
M.T. Signes et al. / Mathematical and Computer Modelling 54 (2011) 1644–1649
Fig. 5. ECG changes in AMI (from University of Utah School of Medicine).
(A) Normal ECG, prior to MI.
(C) Marked ST elevation with hyperacute T wave changes (transmural injury).
(E) Pathologic Q waves, T wave inversion (necrosis and fibrosis).
(B) Hyperacute T wave changes—increased T wave amplitude and width; may also see ST elevation.
(D) Pathologic Q waves, less ST elevation, terminal T wave inversion (necrosis).
(F) Pathologic Q waves, upright T waves (fibrosis).
Fig. 6. ECG pathological changes caused by an AMI (modelled by the recursive formula).
M.T. Signes et al. / Mathematical and Computer Modelling 54 (2011) 1644–1649
1649
Table 2 FN and TP counts and sensitivity for different correlation values.
r ≥ 0.5 r ≥ 0.75 r ≥ 0.95
Pattern A
Only pattern A
None
FN count
TP count
Sensitivity (%)
21 29 0
2 3 0
163/294 = 55.4% 205/294 = 69.8% 291/294 = 99%
2/294 < 0.68% 3/294 < 1% Without significance
129/294 < 43.9% 86/294 < 29.3% Without significance
98 96
Our method achieves a good result in improving the decrease of FN counts. Nevertheless, we also obtain ECGs which show correlation with both A (healthy) and some other illness (B, C, D, E or F). Obviously, we will discard them from the FN count because they suggest illness. It must be noticed that, when r increases, our method seems unable to discern any situation (healthy or ill); in fact, the explanation is that other arrhythmias not necessarily related to AMI can occur, and these are not included in our initial modelled changes, so the model cannot recognize them. When r increases, the TP count decreases. Nevertheless, the sensitivity of the model seems very good, and is comparable with the best results in this field. 5. Conclusions We have developed a new detection scheme for AMI diagnosis. The proposal is a function modelling method based on behavioural considerations which matches ECG recordings. The advantage of our method is the capability to extract from the set of numerical values of the ECGs a characteristic reduced pattern with behavioural meaning which allows more accurate and easy matching. Our preliminary experimentation provides encouraging results that show a decrease of FN counts and achieve a high-level sensitivity. As future work we intend to pursue obtaining a more efficient and complete diagnosis. We plan to estimate the specificity via TN and FP counts. Finally, we are interested in modelling a more complete set of changes in the ECGs as well as their combinations in order to map the localization of the AMI (infero-lateral, antero-lateral, inferior, anterior, . . . ) or other cardiac diseases such as bundle branch block and other coronary damage. References [1] T. Syeda-Mahmood, D. Beymer, F. Wang, Shape-based matching of ECG recordings, in: IEEE Conf. on EMBC 2007. [2] P. de Chazal, O. O’Dweyr, R.B. Reilly, Automatic classification of heartbeats using ECG morphology heartbeat intervals features, IEEE Transactions on Biomedical Engineering 51 (7) (2004) 11961206. [3] D. Cuesta-Frau, J.C. Perez-Cortes, G. Andreu-Garcia, Clustering of electrocardiograph signals in computer-aided holter analysis, Computer Methods and Programs in Biomedicine 72 (2003) 179196. [4] V. Tuzcu, S. Nas, Dynamic time warping as a novel tool in pattern recognition of ECG changes in heart rhythm disturbances, in: IEEE Conf. on SMC 2005, vol. 1, pp. 182–186. [5] I. Christov, et al., Comparative study of morphological and time–frequency ECG descriptor for heartbeat classification, Medical Engineering & Physics 28 (2006) 876887. [6] P. de Chazal, et al. Using wavelet coefficients for the classification of the electrocardiogram, in: EMBS’00, vol. 1, pp. 64–67. [7] P.E. McSharry, G.D. Clifford, L. Tarassenko, L. Smith, Dynamical model for generating synthetic electrocardiogram signals, IEEE Transactions on Biomedical Engineering 50 (3) (2003) 289–294. [8] P.E. McSharry, et al., Method for generating an artificial RR tachogram of a typical healthy human over 24-hours, Computers in Cardiology, IEEE Computer Soc. 29 (2002) 225–228. [9] G. Moody, R. Mark, QRS morphology representation and noise estimation using the Karhunen–Loeve transform, Computers in Cardiology 16 (1989) 269272. [10] M. Lagerholm, et al., Clustering ECG complexes using Hermite functions and self-organizing maps, IEEE Transactions on Biomedical Engineering 47 (2000) 838848. [11] G. Bortolan, I. Jekova, I. Christov, Comparison of four methods for premature ventricular contraction and normal beat clustering, Computers in Cardiology 32 (2005) 921924. [12] P. Frasconi, et al., United integration of explicit knowledge and learning by example in recurrent networks, IEEE Transactions on Knowledge and Data Engineering 7 (1995) 340–346. [13] Yang Wang, et al., A short-time multifractal approach for arrhythmia detection based on fuzzy neural network, IEEE Transactions on Biomedical Engineering 48 (9) (2001) 989–995. [14] O. Alim, et al. Heart diseases diagnosis using heart sounds, in: Proc National Radio Sci. Conf., 2002, pp. 636–640. [15] J.A.C. Nasiri, et al. ECG arrhythmia classification with support vector machines and genetic algorithm computer modeling and simulation, in: EMS’09. [16] F. Wang, F. Syeda-Mahmood, T. Beymer, Finding disease similarity by combining ECG with heart auscultation sound, Computers in Cardiology (2007). [17] D. Gao, et al. Arrhythmia identification from ECG signals with a neural network classifier based on a Bayesian framework, in: 24th Int. Conf. on Innovative Techniques and Applications of AI, December 2004. [18] A. Kam, A. Cohen, Detection of fetal ECG with IIR adaptive filtering and genetic algorithms, in: ICASSP’99. [19] M. Cepek, et al. Comparison of inductive modeling method to other classification methods for holter ECG, in: IWIM 2007. [20] R. Vishnubhotla, Pre-processing of ECG signals for ambulatory use NIU, Engineering Review Journal 1 (2) (2009) Kimberly MacArthur, (Ed.). [21] F. Badlini, et al. Cubic spline estimation in ambulatory ECG recordings for measurement of ST segment displacements, in: EMBS’91, pp. 584–585. [22] L. Burattini, et al., Automatic detection of microvolt T -wave alternans in holter recordings: effect of baseline wandering, Biomedical Signal Processing and Control 1 (2) (2006) 162–168. [23] F. Sufi, I. Khalil, I. Habib, Polynomial distance measurement for ECG based biometric authentication, Security and Communication Networks, J. Wiley and sons, 3 (4) 289–358. [24] D.L. Hudson, M.E. Cohen, Use of intelligent agents in the diagnosis of cardiac disorders, Computers in Cardiology (2002) California Univ., San Francisco, CA, USA. [25] M. Kuttikrishnan, M. Dhanabanachandran, A novel approach of cardiac disease prediction and classification using intelligent agents, International Journal of Computer Science and Network Security 8 (5) (2010). [26] M.T. Signes, et al., Computational framework for behavioural modelling of neural subsystems, Neurocomputing 72 (7–9) (2009) 1656–1667. 2008.