On the classification of arrhythmia using supplementary features from tetrolet transforms

ABSTRACT


INTRODUCTION
It is very unfortunate that the Cardiovascular Disease (CVD) is emerging in higher rates. Cardiac issues are expanding step-by-step in the world. Though several data sources including audible heartbeat, blood pressure, blood sugar level etc. are available, ECG signals play vital role in revealing the cardiac disorder. Abnormality detection is just based on the time, frequency, amplitude, statistical information and other derived features from an ECG wave. Hence, an automatic method of ECG waveform analysis would be highly useful to the human society to detect the heart diseases earlier and hence the appropriate therapy could be employed. While cautiously observing the earlier literatures in arrhythmia classification, it was perceived that the foremost problem is to obtain better classification accuracy when more number of classes are accounted. Since accuracy is inversely proportional to the number of classes of abnormalities in ECG, it is the task of the researcher to choose a suitable feature extraction method which would represent the complete morphological characteristics of various classes of ECG signal. As a novel approach, along with traditional R-R interval data, few other features including statistical, chaotic metrics and supplementary features from Tetrolet transforms have been concatenated in feature sets based on which the classification is done using Support Vector Machines (SVM). The following presentations are about the performances obtained in various earlier works. Myocardial infarction, cardiomyopathy, and myocarditis had been classified in [1], with an accuracy of 95% while classifying the cardiac arrhythmia. The work suffers from a drawback that only 3 classes case was implemented using General Regression Neural Network (GRNN). The work presented in [2], was able to classify normal beat, supraventricular ectopic beat, bundle branch ectopic beat, ventricular ectopic beat, fusion beat and unknown beat from Long term accumulated patient ECG data. This could produce 88% accuracy but this work is not popular due to very less number of classes. Time sequences of QRS complexes of the ECG waveform were converted into Fourier spectrum and frequency components were observed with respect to power within 0-20 Hz spectrum. Grey Relational Analysis (GRA) was performed to classify the above mentioned abnormalities based on MIT-BIH arrhythmia bench mark database. However, this noninvasive method is limited only to 6 classes including the normal beat. This major drawback is due the fact that feature used is based only on the power spectrum of the frequency domain signal.
The recommendations suggested in [3] could classify 7 arrhythmia classes including PVC, Atrial Fibrillation (AF), Complete Heart Block (CHB), Left Bundle Branch Block (LBBB), Normal Sinus Rhythm (NSR), Ventricular Fibrillation (VF) and Ventricular Tachycardia (VT). Totally, 14 features from time domain, frequency domain, nonlinear and chaotic features were extracted to train Multi-Layer Perceptron (MLP) neural networks after computing Heart Rate Variability (HRV). In order to reduce the overall classification time, Generalized Discriminate Analysis (GDA) has been used as a dimension reduction method prior to train the neural network. Though the training set was filtered by deleting the confusing data, overall performance of 95% to 100% accuracy in classification is limited only to 7 classes of arrhythmia on MIT-BIH database.
Non-linear dynamic Lyapunov exponents had been introduced in [4] for the analysis of ECG signals. Normal beat, congestive heart failure beat, ventricular tachyarrhythmia beat, atrial fibrillation beat available in PhysioBank database were classified using the Recurrent Neural Networks (RNN). Levenberg-Marquardt algorithm was used as a training algorithm based on the Maximum, Minimum, Mean and Standard deviation of the Lyapunov Exponents (LE) of each ECG beat. To the best of the knowledge of the author, this is [4] the first valid ECG classification based on chaotic metrics. The classification accuracy obtained was 94.72%. However, the major drawback is limited number of classes (four) and this work has utilized only Lyapunov exponent and discarded other chaotic metrics which would have been used as efficient features.
Most suitable State-Of-Art comparison in arrhythmia classification would be the literature [5], as it deals all the 16 classes as available in MIT-BIH database. This critical work resulted in a classification accuracy of 98.82%. Relevant researchers could get this better accuracy through Discrete Orthogonal Stockwell Transform (DOST) using Discrete Cosine Transform (DCT) for better representation of the ECG signal in Time-Frequency space. To eliminate the redundant features, a dimension reduction had been done with Principal Component Analysis (PCA), considering all the morphological characteristics of the ECG signal. Besides, dynamic R-R interval feature was also computed and concatenated to constitute the final feature set consisting 20 features. Further optimization had been involved in SVM classifier through Particle Swarm Optimization (PSO) while using MIT-BIH arrhythmia benchmark database for Arrhythmia classification. As mentioned earlier, the experimental results generated an improved overall accuracy of 98.82% in comparison with the conventional approaches available prior to this research literature.
The novel idea introduced in this research is to extract energy and entropy from the ECG signals. Since, ECG signals are of one dimension in nature, it is to convert it to 2 dimensional signals as a preprocessing step. After obtaining Tetrolet transforms for the 2-D converted ECG signal, energy and entropy features are concatenated with already available statistical and chaotic features. However, the total numbers of features are lesser than the 20 features as seen in existing State-Of-The-Art Works.
This paper has been organized as follows. Section 1 displays the recent research works on the algorithm used along with the sufferings in those works. Section 2 describes the MIT-BIH arrhythmia database, 1-D to 2-D conversion of ECG signals, Tetrolet transforms, Calculation of Energy and Entropy features from 2-D gray scale images and overall training and testing based on SVM under different kernel functions. Section 3 presents performance metrics including sensitivity, specificity and accuracy based on various Tetrolet decomposition levels and different kernel functions in SVM.

RESEARCH METHOD 2.1. Characterization of ECG
ECG signals are fundamentally weak signal acquired from electrodes after proper amplification and de-noising. The signal is dismantled into P, Q, R, S and T waves globally as seen in Figure 1. The time interval between R of two successive ECG waves reveals the heart rate [6][7][8]. The highest amplitude is obtained from QRS complex which gives more information on the health condition of the heart [9]. All biomedical signals including ECG are very difficult to acquire ideally without noise. Due to the features of feeble amplitude and frequency, ECG signals are usually corrupted by different kinds of noises, including the power line interferences, baseline drift and motion artifacts [10]. Most of the researches have been done based on MIT-BIH arrhythmia database which consists of ECG signals in the following format as given in [5].

MIT-BIH arrhythmia database
For all the experiments conducted, ECG recordings of 47 different subjects comprising 48 records studied by BIH Arrhythmia laboratory has been used [11]. The MIT-BIH database covers 110109 beat labels while the signals are passed through a Band Pass Filter (BPF) when the cut-off frequencies f1 and f2 set between 0.1 Hz and 100 Hz. The digitized outputs are obtained after sampling the BPF filtered signal with sampling frequency of 360 samples per second. Each sample around the range 10 mV is represented by digital data with 11 bit resolution. Modified limb lead from the database has been used particularly heart beat segments obtained using a window across each R-peak. Ground truth obtained from the class annotations provided by the bench mark database is used to cross confirm the classification performance. The summary of the data sets and the details of 16 ECG signal classes are provided in Table 1. In order to maintain the generalization, as selected in the State-of-The-Art work, ECG signals from each of the 16 classes are chosen randomly to constitute the training and testing data sets by dividing the whole data set into 16 bunches, where each group represents their category. Particularly, 15% from normal category, 35% from 'P', 'A', 'V', 'R', and 'L' category, and 40% from each of the remaining ten classes of ECG signals are selected randomly for the training data set, i.e., a total of 21.79% (less proportion for training) events of the whole data set are selected for the training data set while the remaining 78.21% of ECG signals are used for testing the proposed method.
As an attempt to improve the results obtained in [5] chaotic feature sets have been estimated and tested in [12]. In order to still improve the accuracy performance, Energy and Entropy features obtained from Tetrolet transforms have been added to the existing [12] feature sets. It has been a novel method, found in [13] where multichannel 1-D EEG signals had been transformed to volume of data. One dimensional signal from multi-electrodes first converted to two dimensional matrix and the matrices are concatenated to form a volume by concatenating the two dimensional matrices. Aforementioned work confirms the possibility that wave analysis could be done in 2-D and 3-D space. Wavelet based ECG analysis had been done in [14], where features from wavelet coefficients were used to classify Dextrocardia, Tachycardia, Bradycardia, Hyperkalemia, Myocardial, ischaemia, Hypercalcaemia, Sinoatrial block and Sudden cardiac death. Ceylan and Canbilen have found in [15], Tetrolet transforms could be used in medical image processing. Since Tetrolet transforms are efficient to describe the geometrical features, it is highly possible to catch the features based on visual appearance. The signals obtained from the ECG monitoring device or waveforms obtained from MIT-BIH database are of one dimension represented as either row matrix or column matrix. Azad et al, in [16] have greatly inspired a way of converting 1-D signal into 2-D signal based on energy values from the time domain signals.
The overall flow of the proposed Arrhythmia classification system is shown in Figure 2. In this work, an automatic Arrhythmia classification system is implemented for the ECG signals available in MIT-BIH database. The complete implementation of the proposed system consists of both 1-D and 2-D processing. Except the Tetrolet transforms, all other processing are done in one dimensional space.  Converting 1-D to 2-D signal is a straight forward process where, each time sample of the ECG wave is mapped to an element in the matrix of size M x N. All the locations are filled by consuming the successive time samples from the ECG signal as given in Figure 3. By the nature of ECG signals, it is obvious that negative samples also would be present due to the voltage alternations. But, negative elements in 2-D matrix are not permitted in a digital image as the gray scale is from 0 to 255. Therefore, normalization is done on the 2-D matrix yielding a gray scale image as shown in Figure 4.

Tetrolet transform
Haar wavelet decomposition (HWD) effectively utilizes the square shaped mother wavelet function while examining the signals. Besides, the method analyses the signal in terms of orthonormal basis which successfully decomposes the 1-D and 2-D signals into different parts based on its different properties such as: shifted function, linear combination and orthogonalities. Due to the effective decomposing process, Haar wavelet is considered to be a fair tool for signal analysis [17]. The underlying concept of this algorithm is simple but enormously effective. The algorithm construction is similar to that of the digital wedgelets [18] in which only the Haar functions on wedge partitions are used. Using this algorithm, we divide each image into 4x4 blocks and determined that in each block, a Tetromino partition is adapted to the image geometry of each blocks. Using this geometrical shape, a Haar wavelet type called the Tetrolet is defined. This filter bank algorithm is used to decompose an image and obtain Tetrolet coefficients of decomposed subbands.
The Tetrominoes blocks are made by the combination of four equal-sized squares that are connected to each other with at least one square is joined along with an edge. There are five basic Tetrominoes shapes are available as shown in Figure 5.

Features from 2-D gray scale image
From the Tetrolet sub-bands coefficients, the features like energy and entropy values are obtained which are very useful in any classification system. In general, the energy signatures will afford a good indication about the total energy present specifically at any spatial or frequency levels and orientations [19]. It is assumed that, in the energy based approaches, different energy distributions are present at various texture patterns of any spatial or frequency domains. Let energy (E) is an extent of pixel pair repetitions that measures the uniformity of an image. The Tetrolet based energy feature is defined as where, E(I) be the energy of input image I, Mi,j be the sub-band coefficients at location (i, j) and N be the size of the sub-bands. Entropy is defined as the statistical measurement of the uncertainty degree and the information content of a message exists in a system [20]. The entropy gives a measurement of information and therefore it is adopted to characterize an image each of which is considered as a specific feature. The Tetrolet based entropy feature is defined as: where, P(xj) is the probability distribution.

Features from 1-D ECG Signal
By nature, the rhythm of the heart is not synchronized to any common clock and varies among individuals based on the beat count per minute. Also, it depends on current physical and natural conditions of the test specimen. The rhythm variation is usually caught from the R-R interval between two heart beats and this feature is a good representative of the dynamic characteristic of the ECG signals. Aforementioned Table 2 clearly states the list of features which are used in this proposal and corresponding formula to estimate them.
The combination of the pre and post R-R interval feature of the ECG signal corresponds to an instantaneous rhythm characteristic. The mean R-R interval feature is derived by averaging the R-R intervals of the earlier 3 minutes data of a particular specimen. Likewise, the local-R-R feature is derived by calculating the mean of all the R-R intervals of the earlier 8 seconds data of a particular event. Instantaneous interval may not be trustable information for deciding abnormality. Therefore, local and mean R-R features are also considered which represent the average characteristics of a series of ECG signals. Further, kurtosis, skewness and standard deviation are calculated from the obtained R-R interval [12]. Finally, all the features along with energy and entropy features are concatenated. As a result, 15 hybrid features (i.e., four R-R interval features, six chaotic features (Maximum LE, Minimum LE, Average LE, Standard deviation of LE, KSE density and KSE generality), three statistical features and two Tetrolet features (Energy and Entropy) are determined to represent each denoised input ECG and are further processed for classification. Prior to the extraction of aforementioned features, ECG data is filtered using a relevant Low Pass Filter (LPF) with cut-off frequency 400 Hz to remove the interfering low frequency noise. Where, , =sub-band coefficients at location (i, j) and N = size of the sub-bands.

SVM classification
The SVM classifier can be used as a tool for the recognition and classification process in many machine learning applications [21]. SVM is very useful in binary classification and also as multiclass classification in various applications. It is most popular for its one versus one and the one versus all approach means. The algorithm can be understood as follows. Let {x1,x2, x3….xn} be the training sets of a class X, where X⊂ R n . If the mappings function is  then : X⟶H is the feature space. Then the equation can be derived as with subject to w.(xi)⩾p-ξ, let i=1,2,..n and ξi ⩾0, Then,  be the slack variable to penalize misclassification, p is the bias and n is the number of examples.

RESULTS AND ANALYSIS 3.1. Performance metrics
The performance analysis for each class of event is estimated by computing True positive (TP), True negative (TN), False positive (FP) and False negative (FN) parameters, where (TP) and (TN) represent the correct classification of the normal and abnormal ECG signals. On the basis of these TP, TN, FP, FN parameters, the performance metrics for each class of signal are calculated namely, sensitivity, specificity and positive predictivity where, sensitivity is the rate of correctly classified events among the total number of events, whereas positive predictivity refers to the rate of correctly classified events in all detected events. Using these definitions, sensitivity and specificity can be defined as The overall accuracy and error rate can be defined as given in Equations (6) and (7) respectively.

Analysis
The proposed feature extraction and classification methods are implemented using mathematical, statistical, image processing and wavelet tool boxes available in MATLAB software (version 2018a) package installed on Windows 8.1 operating system (i.e., AMD E1-2100 processor, 1 GHz, 4 GB RAM). MIT-BIH arrhythmia bench mark database was used to validate the proposed method. The SVM classifier is trained with 21.8% training data set mentioned in Table 1 and its performance is analyzed for each tested ECG signal under Linear, 2 nd order polynomial, 5 th order polynomial and RBF kernel functions. The prediction performance of the tested ECG signals into their 16 categories using the proposed RBF-SVM classification method is presented in the form of confusion matrix shown in Table 3.
A brief discussion on the confusion matrix is presented below. The bold values shown diagonal wise indicates that number of instances correctly classified. It could be noted that 63371 signals are classified as normal category from total 63764 signals of normal class. Remaining elements in the first row shows the number of instances classified wrongly in other categories. In column 1, 63431 normal signals are detected in the 'normal' class that includes signals from the other categories, i.e., 63371 'normal' signals are correctly classified. So TP in this case is 63371 signals and TP+FN equals 63764 signals. In the identical procedure, the classification results for the other 15 classes of ECG signals are calculated and presented in Table 3. As an overall performance, out of 86113 test signals in total, 85554 signals are correctly classified and 559 signals are misclassified for all 16 classes of ECG signals. The accuracy and error obtained from the proposed method is evaluated from Equations (6) and (7), which is 99.35% and 0.65% respectively.  0  206  61  0  23  0  51  0  The performance assessment of the proposed methodology is carried out by computing the parameters such as TP, FP, and FN from Table 3, using (5) to evaluate the sensitivity and positive predictivity analysis for each class of ECG signal, which is presented in Table 4. It is seen that supplementary features Entropy and Energy values extracted from the 2-D gray scale image has significantly improved the classification accuracy to 99.35% for 4 levels of Tetrolet decompositions. Moreover, the total number of features is still 15, which are less than 20 features as seen in [5]. While focusing on accuracy improvement, slight increase in the time overhead is negligible.
As per the proposed methodology the Tetrolet transform is applied and the features like energy and entropy features are extracted and concatenated to the existing 13 features found in [12] classified using the SVM classifier. In order to maintain the generality, the percentage of training data is maintained same as noted in [5] and [12]. The proposed technique is validated on all the ECG data (i.e., without excluding any segment) of benchmark MIT-BIH arrhythmia database with 21.8% training data (23996 beats from 110109 total beats) favoring a less training time and memory consumption when implemented in real time as an embedded system. The performance of the system is evaluated by varying SVM kernels such as RBF, Linear, and Polynomial kernels for all the four decomposition levels of the Tetrolet transform. In Table 5, the evaluation is done between the 4 levels of the Tetrolet coefficients with the different SVM kernels function using 15 features including energy and entropy. It is observed that the RBF kernel gives the better accuracy than the linear, 2 nd order polynomial (quadratic) and 5 th order olynomial kernels. Also, the highest accuracy is obtained at 4 th level of the Tetrolet co-efficient. The comparative analysis of the proposed system with other Arrhythmias classification system in incremental order based on the number of classes is shown in Table 6. From the Table 6, it is clear that our proposed system is compared with other State-of-Art methods [5,[22][23][24][25][26][27] with different number of classes, dissimilar features and divergent classifiers used in it. When compared to the other method, our system provides the better classification accuracy of 99.35% on MIT-BIH Arrhythmia data base. Table 6. Comparison of proposed arrhythmia classification with other methods

Literature
Approach Classes Accuracy (%) [27] PCA + k-ICA + SVM 5 97.78 [25] PCA + LS-SVM 5 93.48 [24] Morphology + PCA + SVM 6 91.67 [26] Wavelet + BPNN 8 97.40 [23] Higher order statistics + Hermite + SVM 13 95.91 [22] Morphology + Decision 16 96.13 [5] DCT based DOST + SVM-PSO 16 98.82 [12] Chaotic + Statistical metrics + RR + SVM 16 98.95 Proposed Tetrolet (4 level) + Chaotic + Statistical + RR + SVM (RBF kernel) 16 99.35 Though noise immunity was better, Hilbert transform used in [28] could not yield exact R-R interval due to variation in R-R interval between the beats. Unlike the detection of only one class of Arrhythmia in [29], proposed method classifies 16 classes of ECG signal with significantly better classification accuracy compared to other reported works in the literature. All the literature taken for comparison suffers either with insufficient accuracy or less number of classes. In [22], though a fair level of accuracy is obtained for all 16 Arrhythmia classes, the experiments were conducted using 66% of training set and only 33% of testing sets. It is meritorious to use lesser number of training set in classification while simultaneously gaining maximum classification accuracy. In the proposed work, only 21.8% training data are consumed and classification has been done with only 15 features.

CONCLUSION
This paper has offered an automated ECG signal analysis scheme and performed the classification of Arrhythmia consisting of 16 classes including normal and unclassifiable beat. This method is very useful for long-term monitoring and analyzing the non-stationary behavior of the cardiac signals. A combination of R-R interval, statistical, chaotic and Tetrolet transform based features with SVM classifier under RBF kernel could perform better than the State-of-The-Art methods. With the help of 15 features and only with 21.8% of the training data sets, the proposed method could yield an improved accuracy of 99.35% on the benchmark MIT-BIH arrhythmia database. This research work has a scope of extending further to incorporate the classification with dimension reduction and optimization in SVM classification. Further research could be extended towards reducing the training data sets.