6
ECG Classification using Wavelet Transform and Discriminant Analysis Farah Nur Atiqah Francis Abdullah, Fazly Salleh Abas, Rosli Besar Faculty of Engineering and Technology Multimedia University Jalan Ayer Keroh Lama 75450 Melaka Malaysia [email protected], [email protected], [email protected] AbstractThis paper focuses on two cardiac conditions, the supraventricular ectopy and the ventricular ectopy. Four different mother wavelets are used to produce sets of features. Results shows that each cardiac conditions beat has its own unique characteristics and also decomposition of different mother wavelet produced different degree in discriminative power. The Discriminant Analysis Classifier of different distance metric (linear, quadratic and mahalanobis) are tested. Classification performance mostly reached more than 90% for both individual feature and combined feature classification. Keywords-cardiac conditions; wavelet; discriminant analysis; distance metric I. INTRODUCTION Cardiac problem has been a major health issue in these present days considering the amount of admission caused by the cardiac disease. Many studies have been done to assist the prevention and early detection of the cardiac cases among people. Thus, a lot of new algorithms have been developed and used for that purpose. ECG beat recorded from a person proved to be very useful in determining types of cardiac disease that an individual is suffering from because each and every one of the cardiac problem may produce different patterns of ECG signal. This also proved to be useful to distinguish which cardiac problem class does a person’s heartbeat belongs to. The electrocardiogram (ECG) is a signal with unique representations of bioelectric potential with respect to time which can be called as the heartbeat. Figure 1 shows a typical ECG beat pattern according to [1]. Its unique behavior can be a very useful tool for the diagnosis of cardiac disorder. However, the classification of ECG is quite time consuming and tedious because different patient with the same cardiac problem may produce different shape and regularity in its signal. Which means the conduction of electric impulse varies from one patient to another. Detection algorithm of the ECG signal is studied in [3] using wavelet transform decomposition property. The R peak of each ECG signal is very important such as it is one of the earliest processing steps before it undergoes signal analysis. Various methods have been used to extract features from the ECG signal to provide identifications of different classes of heartbeat for signal classification. Each method produces different degree of results depending on the features used for the classification. The most important features to be included in the feature selections are the RR intervals features. Figure 1 shows the typical pattern on an ECG signal together with its P component, QRS component and T component annotations for clearer view. These features are always combined with other additional features to enhance classification performance. The classifier used for the classification of the ECG signal also plays an important role. Selected classifiers performances were tested first to determine the best classifier used that is suitable for classification using those particular features. This is because different group of features may give out different classification performance when tested with different type of classifier. Figure 1. ECG signal pattern [1] Effective and detail study for feature extractions and classification of ECG signal is necessary to produce the strong and stable classifier for ECG signal classification regardless of the condition of the signal. 2012 International Conference on Biomedical Engineering (ICoBE),27-28 February 2012,Penang 978-1-4577-1991-2/12/$26.00 ©2011 IEEE 191

[IEEE 2012 International Conference on Biomedical Engineering (ICoBE) - Penang, Malaysia (2012.02.27-2012.02.28)] 2012 International Conference on Biomedical Engineering (ICoBE) -

  • Upload
    rosli

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

ECG Classification using Wavelet Transform and Discriminant Analysis

Farah Nur Atiqah Francis Abdullah, Fazly Salleh Abas, Rosli Besar Faculty of Engineering and Technology

Multimedia University Jalan Ayer Keroh Lama

75450 Melaka Malaysia

[email protected], [email protected], [email protected]

Abstract—This paper focuses on two cardiac conditions, the supraventricular ectopy and the ventricular ectopy. Four different mother wavelets are used to produce sets of features. Results shows that each cardiac conditions beat has its own unique characteristics and also decomposition of different mother wavelet produced different degree in discriminative power. The Discriminant Analysis Classifier of different distance metric (linear, quadratic and mahalanobis) are tested. Classification performance mostly reached more than 90% for both individual feature and combined feature classification.

Keywords-cardiac conditions; wavelet; discriminant analysis; distance metric

I. INTRODUCTION Cardiac problem has been a major health issue in these

present days considering the amount of admission caused by the cardiac disease. Many studies have been done to assist the prevention and early detection of the cardiac cases among people. Thus, a lot of new algorithms have been developed and used for that purpose. ECG beat recorded from a person proved to be very useful in determining types of cardiac disease that an individual is suffering from because each and every one of the cardiac problem may produce different patterns of ECG signal. This also proved to be useful to distinguish which cardiac problem class does a person’s heartbeat belongs to.

The electrocardiogram (ECG) is a signal with unique representations of bioelectric potential with respect to time which can be called as the heartbeat. Figure 1 shows a typical ECG beat pattern according to [1]. Its unique behavior can be a very useful tool for the diagnosis of cardiac disorder. However, the classification of ECG is quite time consuming and tedious because different patient with the same cardiac problem may produce different shape and regularity in its signal. Which means the conduction of electric impulse varies from one patient to another.

Detection algorithm of the ECG signal is studied in [3] using wavelet transform decomposition property. The R peak of each ECG signal is very important such as it is one of the earliest processing steps before it undergoes signal analysis.

Various methods have been used to extract features from the ECG signal to provide identifications of different classes of heartbeat for signal classification. Each method produces different degree of results depending on the features used for the classification. The most important features to be included in the feature selections are the RR intervals features. Figure 1 shows the typical pattern on an ECG signal together with its P component, QRS component and T component annotations for clearer view. These features are always combined with other additional features to enhance classification performance. The classifier used for the classification of the ECG signal also plays an important role. Selected classifiers performances were tested first to determine the best classifier used that is suitable for classification using those particular features. This is because different group of features may give out different classification performance when tested with different type of classifier.

Figure 1. ECG signal pattern [1]

Effective and detail study for feature extractions and classification of ECG signal is necessary to produce the strong and stable classifier for ECG signal classification regardless of the condition of the signal.

2012 International Conference on Biomedical Engineering (ICoBE),27-28 February 2012,Penang

978-1-4577-1991-2/12/$26.00 ©2011 IEEE 191

This study focuses on two cardiac conditions called the supraventricular ectopy (S) and the ventricular ectopy (V). The purpose is to efficiently classify both cases using the same set of features while at the same time being able to differentiate those two classes.

II. METHODS A. Wavelet Transform (WT)

Wavelet transform enables a signal to be decomposed into signal coefficients derived from the filter bank. There are two types of coefficients coming out from the filter bank, the approximation coefficient and the detailed coefficients. These coefficients provide appear to be a very useful tool as features for classification of ECG signal. Signals are decomposed using the Discrete Wavelet Transform (DWT) into time-frequency representations. The major advantage of the DWT is its great time and frequency localization ability, which enables it to reveal the local characteristics of the input signal [1].

Figure 2. Wavelet Decomposition Steps [9]

Figure 3. Coefficients Diagram of Wavelet Decomposition

There are no specific rules to determine which mother wavelet is the most suitable for particular cases but it is appropriate to do some performance test on different mother wavelet for selection of best mother wavelet to be used in a particular case. [1] and [2] has selected Daubechies of 10th

order (db10) in their studies with different level of decomposition respectively. Few different studies used different mother wavelet for decomposition depending on the features and the cardiac beats set used because different methods for feature selection with different cardiac beats set produce a different set of results. In order to determine which mother wavelet to use, analysis results of the different mother wavelet is obtained and the one with the best results will be chosen as decomposition wavelet [1].

Chen & Yu [9] used a two-stage decomposition from the Haar mother wavelet to obtain three subband signals as features for later used. Outputs resulted from the decomposition provide certain unique characteristics to discriminate different classes of signals.

B. Feature Extraction

1) Preprocessing:

ECG recordings are normally distorted by unwanted noise caused by the recording instruments or movements of patient. In order to get a clean signal, the ECG signals recorded needed to be filtered so that the signal analysis results will not be affected very much by noise. In this work, mother wavelet of db2 of level 4 is used for noise filtering the signals in concern. Most QRS complex detection algorithms were using the same mother wavelet of the same measure in their studies. This is because it is known that level 4 of db2 contains most of the information about the signal. A lot of information will be lost if higher level is used for the filtering.

The ECG data used in this study were taken from the MIT-BIH Arrhythmias Database. The database contains the ECG data of Supraventricular Ectopy and Ventricular Ectopy which are 1 minute long. The database were consisted of more than 70 records of data for each of the heart condition and were sampled at 250 Hz. Normal ECG were used of the same sampling condition were used as control heartbeat for classification.

Before further analysis is done, the signals went through segmentation process in which the QRS complex is detected in order to get the location of the R peak in each of the QRS complexes. The window is set between the R peaks of the previous and after of the target R peak. The segmented signals are then resampled so that the signals have the same length before they undergo the normalization process in order to make sure that the segmented signals have a zero mean and unit variance. The decomposition are

192

done using the wavelet decomposition of few mother wavelet such as db1(Haar), db2, db4, db10, sym4, coif4 and bior6.8 [1][2][3][9][12]. These mother wavelets are chosen based on the previous studies regarding the ECG analysis.

2) Signal Variance and other Statistical Measures :

Statistical measure of the ECG signals used in this study are the kurtosis, skewness, mean and standard deviation of the approximation coefficients and all the subband’s detail coefficients obtained from the decomposed ECG signal.

Kurtosis measures the degree of outlier prone of the distribution of a sample data is while, skewness measures the asymmetry of the data around the sample. Mean is the average value of the data points of the sample and standard deviation measures of how much each data point varies to each other in a sample.

Among these measured values, only few of them show obvious discriminative characteristic between different classes of heartbeat. Classification performance of each one of the statistical properties needs to be tested and observed in order to sort out which properties are best kept as features for classification for later part.

3) RR Interval:

RR peaks interval can be used as features in this study, namely the pre-RR-interval, post-RR-interval and the RR ratio. The pre-RR-interval is the time interval between the occurrence of the previous R peaks and the occurrence of the given R peak. Post R-interval on the other hand, is the time interval between occurrence of the given R peaks and the occurrence of the following R peak. RR ratio is the ratio of pre-RR-interval over the total period of a single heartbeat. These RR features provide strong discriminative properties of different classes of heartbeat.

C. Classification Using The Discriminant Analysis (DA) Classifier

Discriminant Analysis is one of the most popular classification scheme used in pattern recognition. Discriminant Analysis operates by projecting data into lower dimensional vector space in order to maximize the ratio of the between classes distance to the within classes distance which will result in huge discriminating power between different classes.

In this study, Discriminant Analysis Classifier of three different distance metrics is used. The performance of each classifier is observed through few tests. The classifier that produces the best result is selected as classifier in this study.

III. RESULT AND DISCUSSION Figure 4 the dotted line in the chart shows the

performance of features generated from a signal decomposition using db1, db2, db4 and db10 using Linear Discriminant Analysis. It shows clearly from the chart that the results for db1 and db2 do not differ too much from each other. Results for db4 appears to be the lowest of the four mother wavelet used, while results for db10 shows the highest compared to all.

Figure 4. Line Chart of Percentage Performance of Different Mother Wavelet Using the Linear Discriminant Analysis Classifier for

Classification of Supraventricular Ectopy Heartbeat.

Similar results can be seen for the solid line with db10 still shows the highest performance compared to others. The performance results of the four mother wavelet using Quadratic Discriminant Analysis as classifier outstands the performance of the other. Once again the results percentage for db1 and db2 do not differ much from each other as can be seen clearly in Figure 4. The results for db4 came in second after db10. It can be observed clearly that the performance of the wavelets ascended as the order increase.

It can be observed that the results for db1, db2 and db4 for Mahalanobis Discriminant Analysis in Figure 4 do not differ very much from each other while results for db10 still produces the highest among all the wavelets in account. It is represented by the dashed line in the chart. Through observations from those above figure, performance results of db10 using Quadratic Discriminant Analysis classifier holds the highest percentage than Linear and the Mahalanobis Discriminant Analysis classifier.

193

Figure 5. Line Chart of Percentage Performance of Different Mother Wavelet Using the Linear Discriminant Analysis Classifier for

Classification of Ventricular Ectopy Heartbeat.

Same observations are done for the ventricular ectopy signal using the same methods as done for the case of supraventricular ectopy. Dotted line shown in the chart in Figure 5 shows that db1 results are higher than that of db2. Compared to the case of supraventricular results for db2 is always higher than the results for db1. Results for db db4 and db10 came in second and first respectively as seen clearly in the figure. The solid red line represents the performance if the Linear Discriminant Analysis Classifier.

Solid line presentation shows almost the similar results except that the percentage performance between db1 and db2 did not show much difference from each other. Results of the wavelets in the figure were in an ascending order in which the percentage performance increased as the order of the wavelet increased. From the observation of the dashed line in Figure 5, the results for db2 appeared to be a lot higher than the results for db1. Different from its performance shown in the performance using Linear and Quadratic Discriminant Analysis classifier, db4 displayed results lower than that of db2. db10 holds the highest percentage performance in these three figures and the results using the Quadratic Discriminant Analysis classifier produced the highest.

As the line charts in the figures are discussed, it is obvious that the mother wavelet db10 produced consistent results for both the supraventricular ectopy and the ventricular ectopy signal. Since the results of db10 appeared highest in both cases, means db10 can be used as main mother wavelet for the decomposition of ECG signals.

Wavelet decomposition of different types of ECG produced different degree of values. The figures discussed in this chapter agreed that the features derived from the decomposition using db10 showed that they have better discriminative property compared to the other results produced by other mother wavelets.

From the plotted results in figures discussed in this work, features with high discriminative property are selected and percentage performances of each of the features for both concerned cases are recorded in Table 1 and Table 2. Through observations of the results gained, most of the percentage performance reached more than 90% and average of each features percentage are taken and once again features with the highest performance are selected.

The final features selected were based on the features that can perform best in both abnormal cases in concern.

TABLE 1. PERCENTAGE PERFORMANCE OF EIGHT SELECTED FEATURES FOR THE CLASSIFICATION OF SUPRAVENTRICULAR ECTOPY AND NORMAL

HEARTBEAT

Distances

Features Linear Quadratic Mahalanobis

RR Before 98.29% 94.29% 94.39%

RR Before Ratio

94.29% 95.43% 96.57%

Approx STD 94.39% 94.29% 94.29%

Detail Kurtosis, Level 4

93.71% 97.14% 93.14%

Detail STD Level 1

89.71% 97.14% 93.14%

Detail Energy

Level 3 96.57% 97.71% 98.29%

Detail Energy

Level 4 94.86% 94.86% 95.43%

Detail

Energy Level 5 93.14% 92.57% 96.00%

Table 3 shows the classification performances using the combination of eight features and employing different distance metric. The performances are evaluated for all three conditions, the supraventricular ectopy, the ventricular

194

ectopy and normal heartbeat. Meanwhile, Table 4 shows the classification performance between two abnormal conditions, the suparventricular ectopy and the ventricular ectopy. In Table 3, Linear Discriminant Analysis classifier produced higher results than the other, while in Table 4, Mahalanobis Discriminant Analysis classifier shows higher results than the other. The result shown is bit different from

the classification between normal and abnormal in which the Quadratic Discriminant Analysis classifier produced a consistently better results than the other but it performance still obtained above 90%.

TABLE 2. PERCENTAGE PERFORMANCE OF EIGHT SELECTED FEATURES FOR THE CLASSIFICATION OF VENTRICULAR ECTOPY AND NORMAL

HEARTBEAT

IV. CONCLUSIONS In this paper, feature extraction using the wavelet

transform is presented. The methods are discussed step by step until it reached its finalized features. The method to select the classifier used in this study is also discussed. This study consisted of two parts which are feature extraction and classification. In the first part, features are derived from the decomposition of ECG signal using db1, db2, db4 and db10 of level 5. The features are combined with the RR intervals properties and the signal statistical measurements which total up 38 features.

The features used to test classify two cardiac conditions with normal heartbeats as control beat using Discriminant Analysis of three different distance metric, the linear, quadratic and Mahalanobis. Eight features are chosen from the resulting performance based on the highest percentage. Then, further classification is done using the selected features using the same classification method. The results are used to downsize the number of features again. After these methods are conducted, the classifier is finalized. Quadratic Discriminant Analysis Classifier is chosen as the classifier in this study.

The features are downsized to two features and once again the classification is done using Quadratic Discriminant Analysis and the results of classification using the finalized features turned out to better in the form of a better classification performance. It is an interesting finding since the classification is operated using only two features but still able to produce a classification accuracy of more than 98%.

Distances

Features Linear Quadratic Mahalanobis

RR Before 94.94% 94.94% 87.64%

RR Before Ratio 97.50% 99.44% 99.44%

Approx STD 97.75% 97.50% 87.64%

Detail Kurtosis, Level 4

89.33% 96.07% 93.14%

Detail STD Level 1 94.94% 97.75% 97.75%

Detail Energy

Level 3 99.44% 97.75% 97.75%

Detail Energy

Level 4 97.75% 97.19% 97.75%

Detail

Energy Level 5

95.51% 98.88% 96.07%

TABLE 4. PERCENTAGE PERFORMANCE OF EIGHT SELECTED FEATURES FOR THE CLASSIFICATION BETWEEN VENTRICULAR

ECTOPY AND SUPRAVENTRICULAR ECTOPY

L Q M

Classification Performance

93.90% 94.70% 95.10%

L:Linear; Q:Quadratic; M: Mahalanobis

TABLE 3. PERCENTAGE PERFORMANCE OF EIGHT SELECTED FEATURES

L Q M

Classification Performance

94.20% 91.90% 91.90%

L:Linear; Q:Quadratic; M: Mahalanobis

195

REFERENCES [1] A. Adib, M. A. Haque, “ECG Beat Classification Using Discrete

Wavelet Coefficient”, 5th International Symposium on Health Informatics and Bioinformatics (HIBIT), 2010.

[2] P. de Chazal, R. B. Reilly, G. McDarby, B. G. Celler, “Classification of The Electrocardiogram Using Selected Wavelet Coefficients and Linear Diiscriminants.”, Proceedings of the IEEE International Conference Acoustics, Speech and Signal Processing, 2000.

[3] A. Al Raoof BSoul, Soo – Yeon Ji, K. Ward and K. Najarian, “Detection or P,QRS and T Components of ECG Using Wavelet Transformation”, International Conference on Complex Medical Engineering, 2009.

[4] T. M. Nazmy, H. EL – Messiry and B. Al – Bokhity, “Adaptive Neuro-Fuzzy Inference System For Classification of ECG Signals”, The 7th International Conference on Informatics and Systems (INFOS), 2010.

[5] Hyunsoo Kim, B. L. Drake and Haesun Park, “Adaptive Nonlinear Discriminant Analysis by Regularized Minimum Squared Errors”, IEEE Transactions on Knowledge and Data Engineering, Vol. 18, No. 5, May 2006.

[6] M. Gustavo Soto, I. Sergion Torres., “Feature Extraction Based on Circular Summary Statistics in ECG Signal Classification.”, International Conference of The Chilean Computer Science Society, 2009

[7] P. de Chazal, R. B. Reilly, “A Patient-Adapting Heartbeat Classifier Using ECG Morphology and Heartbeat Interval Features.”, IEEE Transactions on Biomedical Engineering, Vol. 53, No. 12, December 2006.

[8] P. Tadejko and W. Rakowski, “Mathematical Morphology Based ECG Feature Extraction for the Purpose of Heartbeat Classification.”, 6th International Conference on Computer Information Systems and Industrial Management Applications. 2007

[9] C. Ying-Hsiang, Yu. Sung-Nien, “Comparison of Different Wavelet Subband Features in The Classification Of ECG Beats Using Probabilistic Neural Network.”, Proceedings of the 28th IEEE EMBS Annual International Conference New York, USA, August 30 – September 3, 2006.

[10] R. M. R. Siveria, C. M. Agulhari, I. S. Bonatti and P. L. D. Peres, “A Genetic Algorithm To Compress Electrocardiograms Using Parameterized Wavelets.”, IEEE International Symposium on Signal Processing and Information Technology, 2007

[11] M. L. Soria and J. P. Martinez, “An ECG Classification Model Based on Multilead Wavelet Transform Features”, Computers in Cardiology 2007.

[12] S. Z. Fatemian and D. Hatzinakos, “A New ECG Feature Extractor For Biometric Recognition”, IEEE 16th International Conference on Digital Signal Processing, 2009.

[13] Y. Prudat, F. De Morsier, M. Lenny and J. M. Vesin, “Adaptive Frequency Tracking on The ECG Used to Predict The Success of Electrical Cardioversion of Atrial Fibrillation”, Computer in Cardiology 2008.

[14] X. Jiang, “Asymmetric Principal Component and Discriminant Analysis for Pattern Classification.”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 31, No. 5, May 2009.

[15] N. A. Amir Hamzah, R. Besar, “Comparison of Different Mother Wavelets in PVC Detection Using PNN.”, 10th International Conference on Information Science, Signal Processing and their Applications (ISSPA 2010) .

196