Abstract
In this study, Random Forests (RF) classifier is proposed for ECG heartbeat signal classification in diagnosis of heart arrhythmia. Discrete wavelet transform (DWT) is used to decompose ECG signals into different successive frequency bands. A set of different statistical features were extracted from the obtained frequency bands to denote the distribution of wavelet coefficients. This study shows that RF classifier achieves superior performances compared to other decision tree methods using 10-fold cross-validation for the ECG datasets and the obtained results suggest that further significant improvements in terms of classification accuracy can be accomplished by the proposed classification system. Accurate ECG signal classification is the major requirement for detection of all arrhythmia types. Performances of the proposed system have been evaluated on two different databases, namely MIT-BIH database and St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database. For MIT-BIH database, RF classifier yielded an overall accuracy 99.33 % against 98.44 and 98.67 % for the C4.5 and CART classifiers, respectively. For St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database, RF classifier yielded an overall accuracy 99.95 % against 99.80 % for both C4.5 and CART classifiers, respectively. The combined model with multiscale principal component analysis (MSPCA) de-noising, discrete wavelet transform (DWT) and RF classifier also achieves better performance with the area under the receiver operating characteristic (ROC) curve (AUC) and F-measure equal to 0.999 and 0.993 for MIT-BIH database and 1 and 0.999 for and St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database, respectively. Obtained results demonstrate that the proposed system has capacity for reliable classification of ECG signals, and to assist the clinicians for making an accurate diagnosis of cardiovascular disorders (CVDs).
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
Introduction
Cardiovascular disorders (CVDs) are one of the major mortality causes worldwide. The building of accurate and fast techniques for automatic Electrocardiogram (ECG) heartbeat signal classification is crucial for clinical diagnosis of different CVDs [53] e.g. an arrhythmia. Notion arrhythmia is used to denote a group of situations where irregular electrical activities originate from heart and are represented by the ECG beats or patterns [10, 38]. ECG is a simple, efficient, non-invasive tool for heart diseases detection. Medical workers analyze different waveforms based on their characteristics (amplitude, polarity, etc.) and make their diagnosis and treatments based on this analysis.
In literature, various techniques are proposed for the automatic ECG heartbeat classification. Recent researches, where computerized algorithms were used, demonstrated that these algorithms are capable of detecting heart arrhythmias with relatively high accuracy rate [24]. Senhadji [44] employed Discrete Wavelet Transform (DWT) as a feature extraction method and linear discriminant analysis as a classifier. Also, a local and global classifier was constructed in tandem with a mixture of experts (MOE) technique [19]. Shyu, et al., [46] used wavelet feature extraction together with Fuzzy Neural Network (FNN) classifier for the classification of Premature Ventricular Contraction PVC heartbeat signals. Hosseini, et al., [18] used a multilayer perceptron (MLP) classifier and obtained accuracy was 88.3 % in the testing set. Power Spectral Density (PSD) was employed for classification ECG signals in [1, 28]. An image-based technique that takes out discriminative data from the ECG signals trajectories in the state space was used. Lagerholm [25] applied a Hermite function together with Self-Organizing Maps (SOM) for ECG heartbeat signals clustering [42]. An automated online heartbeat signal division and classification model built on a Markovian technique was suggested [5]. Particle swarm optimization (PSO) was used to classify Normal heartbeats and five different arrhythmia types by means of the ECG morphology and RR interval features and obtained average accuracy was 93.27 % [34]. One of the main drawbacks of these systems is unsatisfactory classification rate.
As it can be seen, obtained reported classification accuracies, reported in previous researches, are not satisfactory. Classification accuracy rates are below 95 % and in order to have real life system, systems’ classification performances should be as high as possible. From these up-to-date researches, it is obvious that there are a number of significant concerns in the construction of the automatic ECG signal classification system which if appropriately addressed, results in more improved and more proficient diagnostic system design. First concern is related to the preprocessing module. To solve first problem, MSPCA was used in this study. The second concern is related to the selection of suitable feature extraction methods, since the signal features should be taken into account in order to construct system with high performances. The third concern is related to classification approach. Although many researches aimed to design an automatic arrhythmia heartbeat diagnostic system, there is still a need for the improvement of the classification accuracy, sensitivity and specificity when employed for very large databases. Furthermore, majority of the reported techniques employed complex mathematical features resulting in huge computational power during the evaluation of the features. The goal of this study is to design a simple automatic arrhythmia detection and classification system, which will give the highest classification accuracy even when it used for massive databases.
Also, one of the major problems reported in literature in the development of an automatic ECG signal classification systems is related to the preprocessing module. In the signal recording process, different kinds of noise can be introduced and introduced noise can seriously distort the signal. ECG signal de-noising is generally considered in ECG preprocessing phase. In our previous study, we proposed a system with Multiscale Principal Component Analysis (MSPCA) to reduce the signal to noise ratio (SNR) of the ECG heartbeat signal prior to classification [4]. In this study, noise was removed with Multiscale Principal Component Analysis (MSPCA) technique in preprocessing phase in the same way. MSPCA is employed to generate a helpful representation of ECG signals that removes noise and adjusts to the morphological properties of the ECG signal waveform features. After the preprocessing and ECG heartbeat detection phase, the selection of the proper classifier, for correct detection of different arrhythmia types, is an additional problem. The common tendency is to build automatic ECG signal classification systems. For that reason, computer-based ECG signal classification is necessary and tending to be the standard in medical applications [10]. In classification phase, decision tree methods, namely Classification and Regression Tree (CART), C4.5 and Random Forest, were investigated. Decision tree methods, especially Random Forest method, did not almost receive very weak attention in ECG signal classification compared to other research fields. Additional problem is the choice of the proper features. Classification of ECG heartbeats signals should be done based on extracted features so that different arrhythmia types can be identified. Accurate feature extraction is essential for accurate ECG heartbeat classification along with additional different electrocardiograph applications. For ECG feature extraction phase, Discrete Wavelet Transform (DWT) is employed. In the first step, the ECG signals are decomposed into different frequency bands using DWT. In the second step, statistical features extracted from these frequency bands decomposes ECG signals to get better accuracy for heartbeat classification.
The remained of paper is organized in the following way. Section 2 provides the materials and methods used. It presents database used, de-noising module, feature extraction and classifiers. In Section 3, the experimental results are presented and the paper is concluded in Section 4.
Materials and methods
Databases
In this study, two different Physionet database were employed as data sources. These two databases are MIT-BIH Arrhythmia database and St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database (INCARTDB).
MIT-BIH Arrhythmia database records were obtained by the Beth Israel Hospital Arrhythmia Laboratory between 1975 and 1979. This is a free database available online.Footnote 1 This database contains 48 two-lead ECG records obtained from 47 different patients and duration of each of these records is around 30 min. Sampling frequency is 360 Hz. Two records (201 and 202) come from the same subject. Subjects were 25 men aged 32 to 89 and 22 women aged 23 to 89. All beats were labeled two or more cardiologists. In total, there is more than 109,000 labeled beats from 15 distinct heartbeat classes. The class with the highest amount of data is “Normal beat” and the class with the smallest amount of data is “Supraventricular premature beat” (having just two samples) [36]. Five different heartbeat classes were selected for this study: normal (N), left bundle branch blocks (LBBB), right bundle branch blocks (RBBB), atrial premature contractions (APC) and premature ventricular contractions (PVC) heartbeats.
Unbiased assessment of the classification system proposed in this study is essential, however results in several issued. By employing all MIT-BIH arrhythmia database [36] for assessment of the proposed system looks like logical step, nonetheless there is considerable issue which needs to be solved and this issue is that processing all MIT-BIH database extremely time consuming. For that reason, subset of the MIT-BIH arrhythmia database that is comprised of five characteristic ECG heart beat classes was used to assess the proposed system. In different studies, with same MIT-BIH Arrhythmia data base used, different number of heartbeat was extracted from this database. In [9], 500 heartbeats were taken from MIT-BIH Arrhythmia Database (100 samples from each of the classes: LBBB, RBBB, PVC, Fusion Paced and Normal Beat). In [37], 630 beats was selected for ECG heart beat classification (normal heart beats and 5 arrhythmias types, namely LBBB, RBBB, APC, PVC, Paced beat (PB) and Fusion beats (PB)). In [6], total number of 1367 ECG heartbeats were taken from the same database. In [35], 1500 heartbeat was extracted for ECG signal analysis. In this study, 1800 heartbeats was selected, namely 1000 Normal heartbeats, 300 LBB heartbeats, 200 RBBB heartbeats, 200 PVC heartbeats and 100 APC heartbeats. Each ECG heartbeat is a matrix with one lead used and window length is 320 data points used to extract heartbeats. 320 data points is approximately equal 0.889 s. Every ECG heartbeat has five different points used for ECG signal interpretation and understanding. In this study, we considered R-R intervals.
To prove high performances of medical decision support system for diagnosis of heart arrhythmia proposed in this study, beside MIT-BIH database, St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia DatabaseFootnote 2 was also employed. This database contains 75 annotated recordings. These recordings were taken from 32 different Holter recording. Duration of every recording is 30 min and all recordings contain 12 standard leads. Sampling frequency is 257 Hz having gain between 250 and 1100 analog-to-digital converter units per millivolt. These database is comprised more of than 175 000 labeled beats. Subjects were 17 men and 15 women aged 18 to 80 with mean age of 58 [15, 47]. One thousand (1000) heart beats were extracted from each of four different heartbeat classes were selected for this study: normal (N), right bundle branch blocks (RBBB), atrial premature contractions (APC) and premature ventricular contractions (PVC) heartbeats. In total, 4000 heartbeat signals were extracted from this database.
ECG signal de-noising using multiscale PCA
De-noising is the most essential step of the ECG signal classification that generates significant information about numerous heartbeat signal abnormalities. It provides indication for the diagnosis of heart disorders. Due to this significant reason, it received a great attention in which the noise presence and time-varying morphology hardens the ECG signal abnormality detection.
Capacity of PCA to take out relationship among the variables with the capability of orthonormal wavelets to separate deterministic characteristic from stochastic processes is combined together in MSPCA. To benefit from PCA and wavelets, the quantities of all columns are separated into its wavelet coefficients by applying the identical orthonormal wavelet for all variables. Conversion of the data matrix A into a matrix WA, W is a k × k orthonormal matrix with the orthonormal wavelet conversion operator containing the filter coefficients is the result of MSPCA. The matrices WA and A have equal sizes, on the other hand because of the wavelet decomposition, the deterministic component in all A variables is found in a minor number of coefficients in WA, while the stochastic component in every variable is decorrelated in WA, and is extended over all components based on its power spectrum [4, 7, 21].
Feature extraction using discrete wavelet transform
In this study, Discrete Wavelet Transform (DWT) is used for feature extraction from ECG signals. To generalize, DWT is a linear operator that decomposes the signal into numerous components (wavelets) at different frequency bands. Due to its linearity property, DWT is capable to save the significant phase information. Although DWT does not distinguish the noise coefficients from signal coefficients at low SNRs, DWT is still a smart answer for non-stationary signals since it preserves the behavior of ECG heartbeat signals [39, 49].
The DWT is frequently explained in terms of its recovery transform [43]:
Here, ψ is wavelet function, (k, j) ∈ Z 2; k is linked to a as: a = 2k; b is linked to ℓ as b = 2k ℓ; and d(k, ℓ) refers to a sampling of W(a,b) at discrete points k and ℓ. Correlation among waveform and wavelet is described by W(a,b). In the DWT, a novel model is introduced called as the scaling function, a function that simplifies the calculation of DWT. To apply DWT, the optimum resolution is calculated primarily. The calculation then continues to coarser resolutions, but instead of starting over on the original waveform, the calculation applies a smoothed version of the well resolution waveform [43].
DWT studies the signal at various frequency bands, having distinct resolutions. It decomposes the signal into approximation (A – low frequency part of initial signal) and detail (D – high frequency part of initial signal). Both stages of this structure are comprised of two digital filters and two down-samplers by power of 2. The first high-pass filters’ and low-pass filters’ down-sampled outputs and result in detail, D1 and the approximation, A1, in that order. Further on, the first approximation, A 1 is decomposed in the same way into detail D2 and approximation A2, and this procedure is repeated until no more sab-sampling is doable. To reconstruct original signal, approximations and details results are rebuilt with the Daubechies 4 (DB4) wavelet filter. The wavelet coefficients extracted from the signal give a close illustration which demonstrates the ECG heartbeat signal energy distribution in time and frequency domain. More detailed explanations are given in ([3, 48]; Subasi A., EEG signal classification using wavelet feature extraction and a mixture of expert model, 2007).
Very important role in the accurate ECG heartbeat signal classification is the reduction of the dimensionality of the feature extraction. The wavelet coefficients extracted from DWT give a close representation of the ECG signal energy distribution in time and frequency domains. Statistics for classification of ECG signals were utilized for in order to decrease the dimensionality of the set of the wavelet coefficients in DWT domain [20, 49, 50, 52]. Statistical indices utilized to denote the time-frequency distribution of the ECG signals are as follows [50, 51]:
-
(1)
Mean of the absolute values of the coefficients in each sub-band.
-
(2)
Average power of the wavelet coefficients in each sub-band.
-
(3)
Standard deviation of the coefficients in each sub-band.
-
(4)
Ratio of the absolute mean values of adjacent sub-bands.
Indices 1 and 2 represent the frequency distribution of the signal and the indices 3 and 4 the amount of changes in frequency distribution. Seven different values for indices (1), (2) and (3); six different values for index (4), or in total 27 features were extracted. These feature vectors, calculated for the frequency bands A6 and D1–D6 were used as an input to classifiers [51].
Decision tree classifiers
Classification and regression tree (CART)
The Classification and Regression Tree (CART) algorithm is based on determining the most excellent split of all features, and then divides the resulting branches. If we take into consideration a regression problem with inputs X1 and X 2 and continuous output Y and, all of them take values in the unit interval. In all separated elements, Y can be designed having distinct constant. Opposite to this, there is a problem: although all separated lines have an uncomplicated description such as X1 = c, a number of resulting regions are hard to be explained [16].
CART is well-known decision tree technique. It is a one of binary recursive partitioning types. The notion “binary” refers to the entire sets of subjects, characterized by a “node” in a decision tree, and may just be fragmented into two segments. Consequently, every node might be fragmented into two child nodes, and the first node is labelled as a parent node. The notion “recursive” denotes to the binary partitioning procedure which is competent to be used many times. As a result, all parent nodes may produce two child nodes and, and after this, all these child nodes may be fragmented, resulting in new generations. The notion “partitioning” denotes that the dataset is fragmented into segments [27].
C4.5
A “divide-and-conquer” strategy of the learning task from a set of self-governing samples is represented by a model known as a decision tree. Attributes are tested in decision tree nodes. Typically, the test at a node contrasts an attribute value with a constant. On the other hand, a number of trees contrasts two attributes among themselves, or apply certain function having at least one attribute. Classification(s) or probability distribution over every potential classification is done in the leaf nodes. In order to classify signals, signal propagates from top to down in accordance with the values of the attributes being verified in consecutive nodes. Classification process finishes when signal reaches the leaf and signal is classified based on the leaf class [39, 57].
If the verified attribute at a node is a nominal one, the number of children and the number of potential values of the attribute are equal in most of the cases. For every potential value there is one branch. Due to this, the identical attributes will not be tested again in the rest of the tree. From time to time, the attribute values can be split into two different subsets. If it is the case, decision tree will branch into two different modes, according to which subset the attribute value belongs. If this happens, the attribute may be verified several times in the route. If the attribute is quantitative, there will be a two-way split at the node being verified and decision will be made according to the attribute value; i.e. if it is bigger or smaller than some pre-determined value [54].
Random forest (RF)
Random Forest (RF) is a classification technique first used by Breiman [8]. RF applies a group of classification trees [8, 16, 41]. All types of classification trees are built by applying a bootstrap data model. At every division, the candidate variables group is chosen in random manner from a set of all variables. Therefore, random forest applies bagging [8, 16], and random variable assortment for tree construction. All trees are grown completely to produce low-bias trees. Random Forest results in group that is able to attain low bias and low variance. Random forest obtains exceptional performance in classifications. It owns a number of properties:
-
(a)
May be applied when the amount of variables is bigger than amount of observations;
-
(b)
May be applied for multi-class problems;
-
(c)
Has outstanding prognostic performance;
-
(d)
Do not result in over-fitting;
-
(e)
Can handle both categorical and continuous predictors combined together;
-
(f)
Good quality and free implementation codes in different languages and packages are obtained [13].
RF can be used for both; classification and regression. In the case that RF is used in classification tasks, RF receives a class vote for all trees, and at that point does the classification by means of the majority vote. In the case that RF is used in regression tasks, the predictions from all trees at a target point x are only averaged. In reality, the most suitable parameters values depend on task being done, and these parameters are supposed to be understood and used as tuning parameters [16].
Results and discussion
Two different Physionet databases were used in this study, namely MIT-BIH database and St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database. From MIT-BIH arrhythmia database, five different types of heartbeat signals, namely N (normal heart beat), RBBB (Right Bundle Branch Block), LBBB (Left Bundle Branch Block), APC (Atrial Premature Contraction) and PVC (Premature Ventricular Complex) were examined. St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database, four different heartbeat signal types were extracted (N, PVC, APC and RBBB).
Experimental results
There are different approaches in literature to evaluate performances of proposed models. In this study, we considered three different statistical indices, namely F-measure, ROC area and overall accuracy.
A ROC area is obtained by plotting all sensitivity values (true positive part) on the y axis and their correspondent (1-specificity) values (false positive part) for each of the available thresholds on the x-axis. Beside good sides it has, the ROC area does not offer a rule for the classification. Still, there are techniques accepted to generate decisions from the ROC area plot [61]. Determining the proper threshold from a ROC plot is reliant on existing values for the relative costs of false-positive and false-negative values.
It is hard task to allocate values to these costs, perhaps biased and subjected to the environment where the classification decisions will be employed. Zweig and Campbell [61] suggested that if the false-positive costs (FPCs) exceed the false-negative costs (FNCs), the threshold ought to brace specificity, while sensitivity should be braced if vice versa. Joining these expenditures with the prevalence (p) of positive cases permits the slope calculation:
where m stands for the slope of a tangent to the ROC area if it is a flat and parametric curve. The intersection point between tangent and curve depicts the specific sensitivity/specificity pair that might be employed to select the threshold.
Second statistical index used to measure performance in this study is F-measure. F-Measure, also known as effectiveness measure, describes the classification performance in precision-recall space [26, 40]. It is described as the weighted harmonic average of the precision (P) and recall (R) metrics [26]:
where
TP stands for true positive, FN stands for false negative, FP stands for false positive beats. The parameter α depends on the end-user purpose, and have control over the comparative significance of P and R. The aim is to find the ideal parameters by detecting the highest F-Measure aimed at a known α [26].
The most fundamental statistical index for evaluation of total system performance is overall accuracy. It can be calculated as follows:
NE and NT stand for the total number of incorrectly classified ECG beats and total number of ECG beats in the file, in that order [22].
In this study, two different experiments were done. In the first experiment we used DWT without de-noising the ECG signal with MSPCA. In the second experiment we used MSPCA to remove noise from ECG heartbeat signals and DWT is utilized to decompose the ECG signals to different sub-bands. After decomposing signal into sub-bands using DWT, statistical features extracted from the signal. To perform signal de-noising (MSPCA) and feature extraction (DWT), MATLAB was employed. Daubechies 4 (db4) wavelet functions in MATLAB was used. For solving classification problem, decision tree methods were applied. Decision methods were implemented in Weka and default parameters were used. To improve generalization capabilities of decision tree methods, our training and testing sets were generated from different subject. In total we conducted two different experiments to show the effects of MSPCA de-noising [4]. The flowchart with whole procedure followed in this system is given in Fig. 1.
When decision tree methods are used, we need to make decision on in what way to separate data into training and testing data set. Training set is utilized to generate a classification model. Testing set is used to confirm its effectiveness. In all experiments, 10-fold cross validation was used. This means that whole set is divided into 10 mutually exclusive subsets (folds) of approximately equal size. 9 folds are used for training and testing is done on the remaining one fold. The procedure of training and testing is repeated 10 times [4, 39].
Experiment 1: ECG signal classification without MSPCA de-noising
In the first experiment, DWT was utilized to extract significant feature vectors from every ECG signal segment without MSPCA de-noising. The outcome of this extraction is feature set that typifies different ECG signal patterns. Then, decision tree methods were applied for classification; obtained results are shown in Table 1 for MIT-BIH database and in Table 2 for St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database.
For MIT-BIH database, CART classifier gave the lowest the accuracy of 79 %. CART classifier also resulted in the lowest F-measure (F-measure = 0.873). ROC area for CART was 0.873, slightly higher than ROC area of C 4.5 (ROC area = 0.860), but still noticeably lower than RF (ROC area = 0.960). C4.5 gave somewhat higher performance results (Accuracy = 80.44 %). F-measure for C 4.5 classifier was 0.799, slightly higher than F-measure of CART classifier (0.785). The best performance result (highest F-measure, ROC area and overall accuracy) was obtained with RF classifier where F-measure, ROC area and overall accuracy were 0.848, 0.960 and 85.33 % respectively.
For St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database, C 4.5 classifier gave the lowest the accuracy of 92.43 %. C 4.5 classifier also resulted in the lowest F-measure (F-measure = 0.924) and ROC area (ROC area =0.955). Performance results CART and C 4.5 classifiers are still noticeably lower than performance results of RF. CART gave somewhat higher performance results (Accuracy = 92.93 %). F-measure and ROC area for CART classifier were 0.929 and 0.974 respectively, slightly higher than F-measure and ROC area of C 4.5 classifier. The best performance result (highest F-measure, ROC area and overall accuracy) was obtained with RF classifier where F-measure, ROC area and overall accuracy were 0.955, 0.994 and 95.45 % respectively.
From these approaches, it can be seen that obtained performance results are not very high and one of the reasons for this is noise found in the signal. Therefore, prior to applying DWT, a de-noising technique should be used in order to obtain higher performances and classification results.
Experiment 2: ECG signal classification by using MSPCA de-noising
In order to show the effect of de-noising, in the second experiment, we applied MSPCA de-noising technique to de-noise ECG signals. Figure 2, part (a) illustrates the original normal ECG signal and part (b) illustrates the normal ECG signal after MSPCA is applied. The effect of MSPCA based on Signal-to-Noise Ratio (SNR) before and after de-nosing step is considered in this study. For original signal shown in Fig. 2, SNR was equal to 5.0097 dB for original ECG signal and SNR for de-noised signal was equal to 0.7923 dB. This proves that the noise was removed in order to improve the quality of the acquired ECG signals. After the elimination of noise, we applied DWT again (as in the first experiment) to decompose the ECG signals into different sub-bands. After decomposing signal into sub-bands using DWT, statistical features extracted from the signal. Afterwards, we applied decision tree methods for classification.
Obtained performance results are given in Table 3 for MIT-BIH database and in Table 4 for St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database. As it can be seen from the tables, obtained performance results are higher than that of without MSPCA de-noising.
For MIT-BIH database, the accuracies for CART method were found to be 99.0, 90.0, 100.0, 95.5 and 98.7 % for heartbeat cases Normal, APC, PVC, RBBB and LBBB heartbeats respectively and ROC area, F-measure and overall accuracy were 0.992, 0.987 and 98.7 % respectively. The accuracies for C4.5 method were found to be 99.7, 93.0, 100.0, 94.5 and 97.7 % for heartbeat cases Normal, APC, PVC, RBBB and LBBB heartbeats respectively and ROC area, F-measure and overall accuracy were 0.991, 0.984 and 98.4 % respectively. The best performance results were obtained by using RF classifier where ROC area, F-measure and overall accuracy were 0.999, 0.993, and 99.33 % respectively. The accuracies for RF method were found to be 100.0, 96.0, 100.0, 98.0 and 98.7 % for heartbeat cases Normal, APC, PVC, RBBB and LBBB heartbeats respectively.
For St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database, the accuracies for CART method were found to be 99.50, 100.0, 99.80 and 99.90 % for heartbeat cases Normal, APC, PVC and RBBB heartbeats respectively and ROC area, F-measure and overall accuracy were 0.999, 0.998 and 99.80 % respectively. The accuracies for C4.5 method were found to be 99.40, 100.0, 99.80 and 100.0 % for heartbeat cases Normal, APC, PVC and RBBB heartbeats respectively and ROC area, F-measure and overall accuracy were 0.999, 0.998 and 99.80 % respectively. The best performance results were obtained by using RF classifier where ROC area, F-measure and overall accuracy were 1, 0.999, and 99.95 % respectively. The accuracies for RF method were found to be 100.0, 100.0, 99.80 and 100.0 % for heartbeat cases Normal, APC, PVC and RBBB heartbeats respectively.
Discussion
The performances reveled by the decision tree methods for ECG signal classification is due to the next three particular significances: de-noising, extraction of the significant features and classification method miscellany. The most of the significant features extracted from the ECG is subject to the signal processing technique utilized. The features extracted, which are the best suited for ECG signal representation and classification, should be utilized as the inputs for classifiers. For this reason, DWT is selected as a convenient feature extraction for ECG, since it can be used for classification of the nonlinear dynamics underlying heart activity and since it permits understanding of the progress of complexity and consistency of the ECG.
Overall comparison of both approaches for two different databases is given in Table 5 and Fig. 3. In order to have accurate both diagnosis and treatment evaluation, it is of crucial to have precise recognition of ECG signals. Acquired Random Forest model classifies ECG signals using MSPCA de-noising and statistical features of DWT as the input with an accuracy of 99.33 %. This effect also resulted in improvement of ROC area (AUC = 0.999) and F-measure (0.993) of RF classifier. These obtained results were higher than results obtained by sing CART and C4.5 decision tree classifiers. Even though it permits alterability of the input signals, RF classifier has competence to construct a detection scheme established on repetitive patterns. RF classifier, described in this study, is competitive with other methods, found in literature, in classification of ECG signals. It is verified that the RF classifier with MSPCA de-noising and statistical features of DWT is robust enough to alternations in the heartbeat signals for classification of ECG signals.
In order to show the efficiency and strength of suggested system, performance results obtained are compared with the results obtained in other studies. Although it is hard to make such comparison due to different arrhythmia types analyzed, data sets, performance evaluations some conclusions can be generated.
Dingfei, et al., [14] applied autoregressive (AR) modeling and generalized linear model technique were used to classify Normal, Atrial Premature Contraction (APC), Supra Ventricular Tachycardia (SVT), Ventricular Tachycardia (VT), Premature Ventricular Contraction (PVC) and Ventricular Flutter (VF) ECG beats, and they achieve classification accuracy of 93.2 %. A. Khazaee and A. Ebrahimzadeh, [22] used support vector machines (SVMs) and genetic algorithms (GAs) using power spectral features for classification of these five ECG heartbeat types and obtained accuracy was 93.97 %. Gaussian Mixture Model (GMM) was employed to classify principal components of two kinds of abnormal ECG beats and the obtained accuracy was higher than 94 % [30]. Obtained accuracy with cluster analysis (CA) method was 94.3 % for five different ECG heartbeat types (N, RBBB, LBBB, PVC and APC) [56].
Khazaee and Ebrahimzadeh [22] employed SVMs and genetic algorithms using power spectral features and obtained accuracy was 96.00 %. Acir [2] applied support vector machines (SVMs) and discrete cosine transform (DCT) for classification of ECG signals and obtained accuracy was 96.5 %. Zade, et al., [59], achieved accuracy of 97.14 % by using SVM with Gaussian radial basis function (GRBF) kernel for three different types (Normal, PVC and others). Yu and Chou [58] employed Independent Component Analysis (ICA) and, the independent components arrangement scheme was suggested and eight different ECG heartbeats types (Normal, Left Bundle Branch Block (LBBB), Right Bundle Branch Block (RBBB), PVC, APC, paced beats, Ventricular Flutter wave and ventricular ectopic beats) were classified by means of Support Vector Machine (SVM) and Probabilistic Neural Network (PNN) and with this approach the obtained accuracy was higher than 98 %. Particle Swarm Optimization (PSO) and Radial Basis Function Neural Network (RBFNN) were applied to classify six different ECG heartbeats types, namely Normal, PVC, fusion of ventricular and Normal beats, APC, RBBB, fusion of paced and Normal beats, and the obtained sensitivity was higher than 95 % of and specificity was higher than 98 % [23].
A novel fuzzy c-means method was used for classification of five types of ECG heartbeats, namely N, RBBB, LBBB, PVC, APC, and obtained accuracy was 98.28 % [55]. N, RBBB, LBBB, PVC and APC heartbeat types were studied by using PCA analysis and obtained classification accuracy was 98.11 % [31, 32]. Homaeinezhad, et al., [17] performed ECG arrhythmia detection was by means of neuro-SVM-kNN hybrid classifier and achieved accuracy was 98.20 % for 7 different arrhythmias. Shen, et al., [45], achieved classification accuracy of 98.92 % for 12 different ECG heartbeat types by using adaptive feature extraction and modified support vector machines. Principal components of segmented ECG beats in tandem with LS-SVM was used to classify five different ECG heartbeat signal types, namely Normal (N), RBBB, LBBB, APC and PVC [31, 32]. In [31, 32], DWT was used to extract features and PCA was used compress feature space, and extrcated features were fed into gaussian mixture models (GMM), error back propagation neural network (EBPNN) and SVM, and reported performances were 87.36, 93.41 and 95.6 % respectively. Martisa, et al., [33] applied DWT together with ICA as feature extractor and PNN was employed as classifier for classification of five types of ECG hearbeat signals, namely normal, RBBB, LBBB, APC and PVC, and obtained accuracy was 99.28 %. Zidelmala, et al. [60], employed Genetic Algorithm SVM as classifier and obtained the accuracy of 99 % for classification of N, RBBB and LBBB signals. Daqrouq, et al. [12], introduced average framing percentage energy (AFE) of terminal wavelet packet transform (WPT) sub signals as a feature extraction method. PNN was used as a classifier and achieved accuracy was 97.92 %. Recently, Cho et.al. [11] proposed optimized compression algorithm for real time ECG data transmission in wireless networks. Also, Lin et.al. [29] proposed community-based ECG monitoring system that wirelessly detect heart rate, offer individual healthcare improves social contacts. If possibility for classification, similar to approach proposed in this study, is added to these recently proposed systems, quality of patients’ lives would be greatly enhanced.
Based on the results of this study, the followings can be highlighted:
-
The MSPCA de-noising is plays crucial role in the classification of ECG heartbeats.
-
The classifiers with high classification accuracy give insights into the features used for defining the ECG signals. It can be seen easily that the statistical features of DWT coefficients characterize well ECG signals. Good distinction between different ECG signal classes can be achieved if these features are utilized.
-
The classification results and the values of statistical parameters designated that the Random Forest has notably significant accomplishments in the classification of ECG heartbeat signals when compared to other classification results found in literature. Random Forest classifier, proposed in this study, can be exploited in classification of different non-stationary biomedical signals.
-
According to achieved performances, RF-based diagnostic system, proposed in this study, is found to be practical and this system can be utilized in many different clinical studies after it is constructed. This system results in the objectivity of the appraisal of ECG signals and its computerized environment generates easiness of the usage in clinical systems. Moreover the workability of a real-time system construction of this diagnosis system may be improved by expanding parameters range.
Conclusion
In this study, we proposed the automated system for classification of ECG heartbeat signals. Two different database, namely MIT-BIH and St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database, were used to verify the high performances of the system proposed in this study. Five ECG signal patterns from MIT-BIH (normal (N), Premature Ventricular Complex (PVC), Atrial Premature Contraction (APC), Right Bundle Branch Block (RBBB) and Left Bundle Branch Block (RBBB)) and four ECG patterns from St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database (N, APC, PVC and RBBB) were considered in this study. The suggested Random Forest classifier together with DWT and MSPCA is competent for ECG signals classification and results in high accuracy rate. This system is able to classify five most frequent arrhythmia types with very high classification rate, 99.33 % for MIT-BIH database and 99.95 % for St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database. F-measure and ROC area values for this structure were also very high, 0.993 and 0.999 for MIT-BIH database and 0.999 and 1 for St. -Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database respectively. Besides we also used CART and C 4.5 methods for comparison purposes. Accuracies obtained for these two methods were also very high. Obtained results give encouragement to design and evaluate proposed system in order to evaluate the contribution of a cardiovascular disorder diagnosis. To show the efficiency and effectiveness of our proposed system, we compared performance results achieved in this study with results obtained in other studied. Our proposed system is an efficient, simple and express tool for cardiac arrhythmia detection and diagnosis from ECG signals.
References
Acharya, U. R., Automatic identification of cardiac health using modeling techniques: a comparative study. Inf. Sci. 178:4571–4582, 2008.
Acır, N., A support vector machine classifier algorithm based on a perturbation method and its application to ECG beat recognition systems. Expert Syst. Appl. 31:150–158, 2006.
Akay, M., Wavelet application in medicine. IEEE Spectr. 34(5):50–56, 1997.
Alickovic, E., and Subasi, A., Effect of Multiscale PCA de-noising in ECG beat classification for diagnosis of cardiovascular diseases. Circ. Syst. Sig. Process. 34(2):513–533, 2015. doi:10.1007/s00034-014-9864-8.
Andreao, R. V., Dorizzi, B., and Boudy, J., ECG signal analysis through hidden Markov models. IEEE Trans. Biomed. Eng. 53:1541–1549, 2006.
Asl, B. M., Setarehdan, S. K., and Mohebbi, M., Support vector machine-based arrhythmia classification using reduced features of heart rate variability signal. Artif. Intell. Med. 44(1):51–64, 2008.
Bakshi, B. R., Multiscale PCA with Application to Multivariate Statistical Process Monitoring. AIChE Journal. 44(7):1596–1610, 1998.
Breiman, L., Random forests. Mach. Learn. 45:5–32, 2001.
Castillo, O., Melin, P., Ramírez, E., and Soria, J., Hybrid intelligent system for cardiac arrhythmia classification with Fuzzy K-Nearest Neighbors and neural networks combined with a fuzzy system. Expert Syst. Appl. 39(3):2947–2955, 2012.
Chazal, P. d., O’Dwyer, M., and Reilly, R. B., Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Trans. Biomed. Eng. 51(7):1196–1206, 2004.
Cho, G.-Y., Lee, S.-J., and Lee, T.-R., An optimized compression algorithm for real-time ECG data transmission in wireless network of medical information systems. J. Med. Syst. 39(161), 2015.
Daqrouq, K., Alkhateeb, A., Ajour, M. N., and Morfeq, A., Neural network and wavelet average framing percentage energy for atrial fibrillation classification. Comput. Methods Prog. Biomed. 113(3):919–926, 2014.
Díaz-Uriarte, R., & Alvarez de Andrés, S., Gene selection and classification of microarray data using random forest. BMC Bioinforma. 2006
Dingfei, G., Srinivasan, N., & Krishnan, S. M., Cardiac arrhythmia classification using autoregressive modeling. BioMed. Eng. OnLine. 1(5). doi:10.1186/1475-925X-1-5 2002.
Goldberger, A., Amaral, L. A., Glass, L., Hausdorff, J. M., Ivanov, P. C., Mark, R. G., . . . Stanley, H. E., PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation, 101(23), 215–220. Retrieved from http://circ.ahajournals.org/cgi/content/full/101/23/e215. 2000.
Hastie, T., Tibshirani, R., & Friedman, J. . The elements of statistical learning: data mining, ınference, and prediction (2nd ed.). Springer, 2009.
Homaeinezhad, M. R., Atyabi, S. A., Tavakkoli, E., Toosi, H. N., Ghaffari, A., and Ebrahimpour, R., ECG arrhythmia recognition via a neuro-SVM–KNN hybrid classifier with virtual QRS image-based geometrical features. Expert Syst. Appl. 39:2047–2058, 2012.
Hosseini, H. G., Reynolds, K. J., & Powers, D., A multi-stage neural network classifier for ECG events. 23rd Int. Conf. IEEE EMBS, 2, pp 1672–1675, 2001.
Hu, G. M., Palreddy, S., and Tompkins, W., Patient adaptable ECG beat classifier using a mixture of experts approach. IEEE Trans. Biomed. Eng. 44:891–900, 1997.
Kandaswamy, A., Kumar, C. S., Ramanathan, R. P., Jayaraman, S., and Malmurugan, N., Neural classification of lung sounds using wavelet coefficients. Comput. Biol. Med. 34(6):523–537, 2004.
Kevric, J., and Subasi, A., The effect of multiscale PCA de-noising in epileptic seizure detection. J. Med. Syst. 38(131):1–13, 2014. doi:10.1007/s10916-014-0131-0.
Khazaee, A., and Ebrahimzadeh, A., Classification of electrocardiogram signals with support vector machines and genetic algorithms using power spectral features. Biomed. Signal Process Control. 5:252–263, 2010.
Korurek, M., and Dogan, B., ECG beat classification using particle swarm optimization and radial basis function neural network. Expert Syst. Appl. 37(12):7563–7569, 2010.
Krummen, D. E., Patel, M., Nguyen, H., Ho, G., Kazi, D. S., and Clopton, P., Accurate ECG diagnosis of atrial tachyarrhythmias using quantitative analysis: a prospective diagnostic and cost-effectiveness study. J. Cardiovasc. Electrophysiol. 21(11):1251–1259, 2010.
Lagerholm, M., Clustering ECG complexes using Hermite functions and self-organizing maps. IEEE Trans. Biomed. Eng. 47:839–847, 2000.
Lazarevic-McManus, N., Renno, J. R., Makris, D., and Jones, G. A., An object-based comparative methodology for motion detection based on the F-Measure. Comput. Vis. Image Underst. 111:74–85, 2008.
Lewis, R. J., An Introduction to Classification and Regression Tree (CART) Analysis. Annual Meeting of the Society for Academic Emergency Medicine. San Francisco, California. 2000.
Lin, C. H., Frequency-domain features for ECG beat discrimination using grey relational analysis based classifier. Comput. Math. Appl. 55:680–690, 2008.
Lin, B.-S., Wong, A. M., and Tseng, K. C., Community-based ECG monitoring system for patients with cardiovascular diseases. J. Med. Syst. 2016. doi:10.1007/s10916-016-0442-4.
Martis, R. J., Chakraborty, C., and Ray, A. K., A two-stage mechanism for registration and classification of ECG using Gaussian mixture model. Pattern Recogn. 42(11):2979–2988, 2009.
Martis, R. J., Acharya, U. R., Mandana, K. M., Ray, A. K., and Chakraborty, C., Application of principal component analysis to ECG signals for automated diagnosis of cardiac health. Expert Syst. Appl. 39:11792–11800, 2012.
Martis, R., Krishnan, M. M., Chakraborty, C., Pal, S., Sarkar, D., Mandana, K. M., and Ray, A. K., Automated screening of arrhythmia using wavelet based machine learning techniques (Article). J. Med. Syst. 36(2):677–688, 2012.
Martisa, R. J., Acharya, U. R., and Min, L. C., ECG beat classification using PCA, LDA, ICA and discrete wavelet transform. Biomed. Signal Process. Control. 8(5):437–448, 2013.
Melgani, F., and Bazi, Y., Classification of electrocardiogram signals with support vector machines and particle swarm optimization. IEEE Trans. Inf. Technol. Biomed. 12(5):667–677, 2008.
Melin, P., Amezcua, J., Valdez, F., and Castillo, O., A new neural network model based on the LVQ algorithm for multi-class classification of arrhythmias. Inf. Sci. 279:483–497, 2014.
MIT-BIH Arrhythmia Database Directory., Retrieved May 2, 2012, from MIT-BIH Arrhythmia Database Directory: http://www.physionet.org/physiobank/database/html/mitdbdir/mitdbdir.htm. 2001.
Moavenian, M., and Khorrami, H., A qualitative comparison of artificial neural networks and support vector machines in ECG arrhythmias classification. Expert Syst. Appl. 37:3088–3093, 2010.
Pan, J., and Tompkins, W. J., A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng. BME-32(3):230–236, 1985.
Polat, K., and Güneş, S., A novel data reduction method: distance based data reduction and its application to classification of epileptiform EEG signals. Appl. Math. Comput. 200(1):10–27, 2008.
Rijsbergen, R. V., Information retrieval (2nd ed.). Department of Computing Science, University of Glasgow. 1979. Accessed from: http://www.dcs.gla.ac.uk/Keith/Preface.html.
Ripley, B. D., Pattern recognition and neural networks. Cambridge University Press, Cambridge, 1996.
Sarvestani, R. R., Boostani, R., and Roopaei, M., VT and VF classification using trajectory analysis. Nonlinear Anal. 2008. doi:10.1016/j.na.2008.10.015.
Semmlow, J. L., Biosignal and biomedical ımage processing - MATLA B-Based Applications. Marcel Dekker, 2004.
Senhadji, L., Carrault, G., Bellanger, J.J., and Passariello, G., Comparing wavelet transforms for recognizing cardiac patterns. IEEE Eng. Med. Biol. 14(2):167–173, 1995.
Shen, C.-P., Kao, W.-C., Yang, Y.-Y., Hsu, M.-C., Wu, Y.-T., and Lai, F., Detection of cardiac arrhythmia in electrocardiograms using adaptive feature extraction and modified support vector machines. Expert Syst. Appl. 39:7845–7852, 2012.
Shyu, L. Y., Wu, Y. H., and Hu, W. C., Using wavelet transform and fuzzy neural network for VPC detection from the Holter ECG. IEEE Trans. Biomed. Eng. 51:1269–1273, 2004.
St.-Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database., Retrieved Februare 6, 2015, from PhysioBank: http://www.physionet.org/pn3/incartdb/ 2015.
Subasi, A., Automatic recognition of alertness level from EEG by using neural network and wavelet coefficients. Expert Syst. Appl. 28:701–711, 2005.
Subasi, A., EEG signal classification using wavelet feature extraction and a mixture of expert model. Expert Syst. Appl. 32:1084–1093, 2007.
Subasi, A., Medical decision support system for diagnosis of neuromuscular disorders using DWT and fuzzy support vector machines. Comput. Biol. Med. 42(8):806–815, 2012.
Subasi, A., Classification of EMG signals using PSO optimized SVM for diagnosis of neuromuscular disorders. Comput. Biol. Med. 43(5):576–586, 2013. doi:10.1016/j.compbiomed.2013.01.020.
Subasi, A., and Gursoy, M. I., EEG signal classification using PCA, ICA, LDA and support vector machines. Expert Syst.Appl. 37(12):8659–8666, 2010.
Thaler, M. S., The only EKG book you’ll ever need, vol. 3. Lippincott Williams & Wilkins, Philadelphia, 1999.
Witten, I. H., and Frank, E., Data mining practical machine learning tools and techniques, 2nd edition. Elsevier Inc, San Francisco, 2005.
Yeh, Y.-C., Wang, W.-J., and Chiou, C. W., A novel fuzzy c-means method for classifying heartbeat cases from ECG signals. Measurement 43:1542–1555, 2010.
Yeh, Y. C., Chiou, C. W., and Lin, H.-J., Analyzing ECG for cardiac arrhythmia using cluster analysis. Expert Syst. Appl. 39:1000–1010, 2012.
Yu, S.-N., and Chou, K.-T., A switchable scheme for ECG beat classification based on independent component analysis. Expert Syst. Appl. 33:824–829, 2007.
Yu, S. N., and Chou, K. T., Selection of significant independent components for ECG beat classification. Expert Syst. Appl. 38(2):2088–2096, 2009.
Zade, A. E., Khazaee, A., and Ranaee, V., Classification of the electrocardiogram signals using supervised classifiers and efficient features. Comput. Methods Prog. Biomed. 99:179–194, 2010.
Zidelmal, Z., Amirou, A., Ould-Abdeslamb, D., and Merckleb, J., ECG beat classification using a cost sensitive classifier. Comput. Methods Prog. Biomed. 11(3):570–577, 2013.
Zweig, M. H., and Campbell, G., Receiver-operating characteristic (ROC) plots: a fundamental evaluation tool in clinical medicine. Clin. Chem. 39(4):561–577, 1993.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest
The authors declare that they have no conflict of interest.
Additional information
This article is part of the Topical Collection on Patient Facing Systems
Rights and permissions
About this article
Cite this article
Alickovic, E., Subasi, A. Medical Decision Support System for Diagnosis of Heart Arrhythmia using DWT and Random Forests Classifier. J Med Syst 40, 108 (2016). https://doi.org/10.1007/s10916-016-0467-8
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10916-016-0467-8