Literature DB >> 34336169

An Intelligent Heartbeat Classification System Based on Attributable Features with AdaBoost+Random Forest Algorithm.

Runchuan Li1,2, Wenzhi Zhang1,2, Shengya Shen3, Jinliang Yao1,2, Bicao Li4, Bing Zhou1,2, Gang Chen2, Zongmin Wang2.   

Abstract

Arrhythmia is a common cardiovascular disease that can threaten human life. In order to assist doctors in accurately diagnosing arrhythmia, an intelligent heartbeat classification system based on the selected optimal feature sets and AdaBoost + Random Forest model is developed. This system can acquire ECG signals through the Holter and transmit them to the cloud platform for preprocessing and feature extraction, and the features are input into AdaBoost + Random Forest for heartbeat classification. The analysis results are output in the form of reports. In this system, by comparing and analyzing the classification accuracy of different feature sets and classifiers, the optimal classification algorithm is obtained and applied to the system. The algorithm accuracy of the system is tested based on the MIT-BIH data set. The result shows that AdaBoost + Random Forest achieved 99.11% accuracy with optimal feature sets. The intelligent heartbeat classification system based on this algorithm has also achieved good results on clinical data.
Copyright © 2021 Runchuan Li et al.

Entities:  

Mesh:

Year:  2021        PMID: 34336169      PMCID: PMC8289583          DOI: 10.1155/2021/9913127

Source DB:  PubMed          Journal:  J Healthc Eng        ISSN: 2040-2295            Impact factor:   2.682


1. Introduction

In recent years, the incidence rate of cardiovascular diseases is increasing, which seriously threatens human life [1]. Arrhythmia can be divided into two types, life-threatening arrhythmia and nonlife-threatening arrhythmia. Life-threatening arrhythmia can lead to cardiac arrest and sudden death. These patients need urgent treatment. Although nonlife-threatening arrhythmia may not threaten human life immediately, it still needs to be treated timely to avoid further deterioration. Therefore, the intelligent detection and diagnosis of arrhythmia is of great significance for monitoring, preventing the occurrence of heart disease, and improving the work efficiency of doctors. Long-term continuous monitoring [2, 3] of electrocardiogram (ECG) provides valuable information for the prevention of heart attack diseases [4]. Doctors can diagnose the nature of arrhythmia by analyzing the ECG. In order to monitor the nature of abnormal heartbeat, it is necessary to analyze the electrical signal of each heartbeat. However, analyzing long-term ECG records is very time-consuming for doctors. Sometimes, doctors may inevitably make personal mistakes. Therefore, accurate intelligent classification of arrhythmia can improve doctors' efficiency and reduce the occurrence of misdiagnosis or missed diagnosis [5]. This paper presents a heartbeat classification system based on multiple-feature fusion and improved random forest, which can classify arrhythmia from real data collected by the ECG acquisition equipment. This system completely accomplished the process from ECG signal collection to heartbeat classification, and then to present the classification results to doctor. The contribution of this research presented in this paper is as follows: Developed an intelligent heartbeat classification system from collection, analysis, to result presentation. This system can effectively improve doctors' work efficiency. An optimal attributable heartbeat feature set is obtained towards the best possible heartbeat classification system via feature comparison identified through the implementation of multiple classifiers, arrhythmia classification analysis, and feature combination comparison. After testing, AdaBoost + Random Forest was found to be the best heartbeat classification system. This method can not only deal with input samples with high-dimensional characteristics but also effectively deal with imbalance data classification with random forest approach, which provided an effective method to balance the error of the data set. The interpretability analysis of the learning content of heartbeat classification system based on AdaBoost + Random Forest algorithm is carried out by constructing feature sets of different ECG prior knowledge and improving the accuracy of heartbeat classification, which has important clinical significance. The rest of this paper is organized as follows: Part 2 briefly introduces the related work. Part 3 provides an over-view of the system architecture. Part 4 details the major process of our system, the algorithm of heartbeat classification. Part 5 presents system performance analysis. Part 6 summarizes the full text.

2. Related Work

In the past, the diagnosis of arrhythmia was mainly dependent on the experience of doctors. With the development of artificial intelligence, automatic classification has been applied to various industries in recent years [6-9]. A variety of systems for automatic classification of heartbeat had been proposed by some researchers. These systems can be divided into two types, a classification system based on deep learning and a classification system based on feature engineering. A few systems [10-14] used deep neural network to classify heartbeat, but deep neural networks (DNN) have problems with parameter redundancy. Hilera et al. [15] used ANN to detect arrhythmia to study the usefulness of ANN in clinical diagnosis. But, it is difficult to accurately analyze the performance indicators of neural network using ANN. Li et al. [16] merged the shape and rhythm of the heartbeat into a two-dimensional information vector, and used Convolutional Neural Network to classify the heartbeat. The results show that the system has a better classification effect on v and s categories. Wang et al. [17] proposed a globally updatable classification system in view of the large individual differences and the high cost of marking the ECG icon, which has a good classification effect. The algorithm of heartbeat classification based on deep learning can effectively distinguish between different types of arrhythmias. It is very important for doctors to diagnose diseases, as precise analytical classification can help doctors to accurately diagnose and accurately draw up appropriate treatment plans. However, methods based on deep learning cannot analyze the impact of features on the performance of heartbeat classification. Feature extraction is an important step in the accurate classification of arrhythmia. Over the past few decades, researchers have used a variety of features to automatically classify arrhythmia, including ECG morphology [18, 19], interval [20-23], QRS area [24, 25], wavelet coefficient [26, 27], hermite coefficient [28], and high-order statistics [28, 29]. The relevant features of ECG signals are extracted, and then input into learning algorithms to induce models to classify arrhythmia. At present, machine learning is widely used in medical diagnosis to assist doctors improve the efficiency of diagnosis and treatment. Yildirim [30] uses the wavelet transform method to detect heartbeats in ECG data, and divides these heartbeats into segments according to certain cycles, and then performs multi-resolution wavelet transforms into the segmented signals to obtain different frequencies of the wavelet coefficients, and then develop a heartbeat classification system. The test results confirm the effectiveness of this approach. However, this method only focuses on the features of wavelet coefficients and does not concentrate on other features, which provides a good potential for further improvement. Alickovic and Subasi [31] applied Random Forest to the diagnosis of ECG arrhythmia, using Discrete Wavelet Transform to decompose the ECG signal into different continuous frequency bands, and the purpose of ECG intelligent diagnosis system is to distinguish each kind of heartbeat accurately. The above work has made some achievements in heartbeat classification using morphological features, interval features, QRS wave area, wavelet coefficients, and other aspects, and these intuitive features make full use of the doctor's logical experience and ECG data. There is an expectation in improving heart rate classification accuracy. The project depends on the combination of intuitive attributive features. In order to select the best feature combination, the influence of different feature combinations of heartbeat classification is analyzed. A new heartbeat classification system based on attributable intelligent classification method is presented in this paper. It improves the accuracy of classification and the work efficiency of doctors.

3. System Architecture

The fundamental purpose of the ECG intelligent diagnosis system is to distinguish each kind of heartbeat accurately. There is an expectation in improving heart rate classification accuracy. The research value of this project depends on the effective selection and combination of intuitive attributive features, as well as the interpretable reasoning analysis of classification performance. A new heartbeat classification system based on multi-feature fusion and AdaBoost + Random Forest method is presented in this paper. In order to select the best feature combination, the influence of different feature combinations on heartbeat classification is analyzed. The best feature combination is selected and input into AdaBoost + Random Forest for classification. It effectively uses the ECG data and improves the accuracy of classification. The focus of the system is heartbeat classification system based on attributable features and AdaBoost + Random Forest algorithm; the next section will describe the system process in detail. This section introduces the overall structure of the system. The overall architecture of the system is shown in Figure 1. It shows that the system components mainly include Holter, smart phones, and soft system. The data collected through Holter is uploaded to the server for analysis. This process requires the user to download the APP on the mobile phone. Before classification, the system automatically extracts features based on denoised ECG data. These features are the best combination of features selected after the test. Compared with other systems, the classification system based on these features makes full and effective use of ECG data and has better interpretability. After classification, the result report will be sent to the patient after being checked by a doctor. Figure 2 is the logical design of the system.
Figure 1

The overall architecture of the system.

Figure 2

The logic design of the system.

Figure 3 shows the ECG system function diagram. The system is developed based on Microservice [32], which has better scalability, easy deployment, and low coupling. The holter collects data from the patient and transmits the data to the subject's mobile phone via Bluetooth. The acquired data are stored in the ECG parameter center on the cloud platform through the http/https protocol, namely, ECGDatabaseGateway Server. The specific transmission, storage, and analysis steps of the collected ECG data on the cloud platform are as follows: ECGDeviceGateway receives and distributes ECG data; ECGDataRouter server realizes the forwarding of ECG data through the subscription-publishing mechanism through NATS. ECGAnalyzeGateway sends the ECG data analysis request to ECGAnalyzeServer that deploys the core algorithm proposed. After receiving the request, ECGAnalyzeServer passes the ECG parameters to the algorithm program for analysis. The transmission uses RPC [33] in order to achieve high transmission efficiency and low performance consumption. The ECGAnalyzeGateway server uses NATS [34] to transmit the analyzed results to the ECGPipeGateway server for real-time transmission during diagnosis. The ECGPipeGateway server displays the results of real-time ECG monitoring on each terminal through the WebSocket protocol [35] that can unilaterally send information to the client, reducing the delay caused by waiting for a reply. At the same time, ECGAnalyzeServer transmits the results to the ECGDataBaseGateway server, which is responsible for storing results of the ECG analysis and classification. Due to the complexity of ECG data, MongoDB [36] is used to store ECG data.
Figure 3

The ECG system function diagram.

4. System Process

This process uses multi-feature fusion and AdaBoost + Random Forest method to classify heartbeats. It includes ECG signal data, preprocessing, feature extraction, and heartbeat classification. Figure 4 shows the framework of heartbeat classification algorithm.
Figure 4

The framework of heartbeat classification algorithm.

4.1. ECG Signal Preprocessing

In order to classify heartbeat more accurately, it is necessary to denoise the ECG data and detect waveform. The wavelet transform can retain the features and important physiological details of ECG signal, and have a simple calculation process [37]. Therefore, a continuous wavelet is used to remove the original ECG signal noise and detect the boundaries and peak positions of the three waves. In this paper, wavelet transform is a signal time-frequency analysis method [38], which provides time-domain and frequency-domain features. The principle of continuous wavelet transform [39] is shown in formulas (1) and (2). (1) and (2). This paper uses wavelet transform to achieve denoising and R wave detection. In formula (1), a is the scale factor, and b is the transform factor. Their role is to stretch the basic wavelet function ψ(t); τ reflects the displacement, and a and τ are continuous variables. The results of CWT can be expressed as functions of scale factor a and transformation factor b. The translation factor enables the wavelet to complete the ergodic analysis along the time axis of the signal. The transform factor can approach different frequency signals in every traversal through scaling wavelet transform.

4.2. Heartbeat Feature Extraction and Combination

A complete cardiogram consists of P wave, QRS wave, and T wave. The time interval between the feature points of these waves directly reflects the systolic and diastolic process of heart atrium and ventricle, which is of great value in the diagnosis of heart disease [40]. The extracted ECG features are described as follows: In this paper, the sampling rate is 360 Hz. According to the R peak position, 235 single heartbeat morphological features are extracted [41]. Among them, there are 90 sampling points before the R peak and 144 sampling points after the R peak. If there are less than 235 sampling points before and after the first or last QRS complex is detected in the ECG record file, the corresponding heartbeat is ignored. Each record in the MIT-BIH arrhythmia database contains two leads, of which lead A is lead II and lead B is lead V1. However, in some records, lead B is known to be V2, V5, or V4. According to literature [41, 42], QRS complex is more prominent in lead A, so lead A is usually used to detect heartbeat, lead B has more advantages in distinguishing S and V category arrhythmia. A total of 470 single heartbeat morphological features are obtained from two leads, respectively. Figure 5 shows the two leads in an MIT-BIH arrhythmia database record 210 (10 sec).
Figure 5

Example of two leads (II, V1) in an MIT-BIH arrhythmia database record 210 (10 sec).

P wave interval, QRS wave interval, T wave interval, PR segment, ST-T interval, QT interval, and RR interval are common features of ECG. The sampling rate (SR) is 360 Hz in this study. Figure 6 is the interval diagram of normal heartbeat. The calculation formula is shown in equations (3)– (9):
Figure 6

Interval diagram of normal heartbeat.

The QRS complex is the most energetic part of the ECG signal and contains most of the information of the entire heartbeat. The time from the start of the QRS complex to the end of the QRS complex is the QRS time limit, and the QRS wave area is the integral sum of the QRS complex from the start to the end. The QRS complex reflects the changes in left and right ventricular depolarization potentials and time. The first downward wave is the Q wave, the upward wave is the R wave, and the downward wave is the S wave. Therefore, the shape of the QRS complex is mainly considered when selecting the wavelet base. According to the waveform of a cardiac cycle, we choose the db6 wavelet as the wavelet basis function to implement wavelet decomposition [43], because the db6 wavelet has good regularity, which makes the reconstructed signal smooth. The frequency band of QRS complex is generally in the range of 0.5–45 Hz. The wavelet packet decomposition diagram is shown in Figures 7 and 8. Figure 7 shows ECG original signal and its wavelet transform on a 1–6 scale. Figure 8 shows ECG original signal and its wavelet transform on a 7–12 scale. S represents the input ECG signal, A represents the approximation coefficient of the wavelet packet decomposition, and D represents the detail coefficient of the wavelet packet decomposition. In this paper, the wavelet coefficients are extracted as features.
Figure 7

The decomposition process of the 12-level wavelet packet (a).

Figure 8

The decomposition process of the 12-level wavelet packet (b).

In feature engineering, as a single feature cannot fully describe the properties of ECG comprehensively, first-order discrete features are often combined to form high-order combined features, so as to improve the fitting ability of complex relationships. Therefore, the features are divided into five sets, namely, A, B, C, D, and E. Among them, set A and B are morphological features, set C is interval information, set D is area information, and set E is frequency feature. The definition and division of five feature sets are as follows: Set A: {235 single heartbeat morphological features from single lead} Set B: {470 single heartbeat morphological features from double leads} Set C: {P wave interval, QRS wave interval, T wave interval, PR segment, ST-T interval, QT interval, and RR interval} Set D: {QRS area} Set E: {Wavelet coefficient}

4.3. AdaBoost + Random Forest Model

AdaBoost ensemble algorithm is an iterative algorithm based on multiple base learners of the same type. The goal of iterative is to form a strong learner [44-46]. The algorithm trains different basic learners on the same training set, changes the weights of samples of iteration, and uses a weighted voting mechanism to stack multiple basic learners, and finally gets the best, strong learner for the overall classification performance. The basic learner of AdaBoost + RF algorithm consists of random forest. Random forest is an important integrated learning method based on bagging. The final prediction result is based on a voting algorithm. Compared with other classification algorithms, random forest algorithm can maintain high accuracy and has good stability [47]. The steps in AdaBoost algorithm are described in Algorithm 1. Figure 9 shows the process of generating the final classifier. Equations (10)–(13) refer to literature [45].
Algorithm 1

AdaBoost ensemble algorithm steps.

Figure 9

The process of generating the final classifier.

In AdaBoost ensemble algorithm, the training data set is X={(x1,  y1), (x2,  y2),…, (x,  y)}, where x represents the sample point and y represents the corresponding category of the sample; the importance of the basic classifier G depends on its error rate. The error rate e is defined aswhere {(x, y)|j=1,2,…, N} represents a set of N training samples. If the predicate P is true, then I(p)=1, otherwise 0. The base classifier is defined as According to the definition of α and e, the lower error rate means that the base classifier is more important. Once the e of a base classifier is higher than 50%, the weight of this round needs to be restored to the initial value and resampled. Update the weight distribution of the training data set:where z=∑wexp(−αyG(x)) is the gauge factor that makes the sum of all w equal to 1. The final output function is

5. System Performance Assessment Analysis

The system test is implemented on Python 3.7 and MATLAB @ R2018b. Gaussian Naive Bayes (GNB), Linear Discriminant Analysis (LDA), Decision Tree (DT), Random Forest model (RF), Gradient Lifting Iterative Decision Tree (GBDT), Support Vector Machine (SVM), and Logistic Regression (LR) are selected for performance comparison. When the data are unbalanced, for the multi-classification problem, the type with a large sample size will have an over-fitting phenomenon during training, and the type with a small sample size will have an under-fitting phenomenon, resulting in false high accuracy of the overall heartbeat classification. This paper deals with data imbalance based on the algorithmic perspective and alleviates the problem of data imbalance by combining AdaBoost and Random Forest. Random Forests are relatively robust to missing data and unbalanced data, and can well predict the effects of up to thousands of variables [48]. The principle is to use small sample sizes in all classifications when generating the training set, and at the same time randomly extract data from the large sample size in the classification to combine with the small sample size to form the training set to obtain multiple training sets and decision tree models. Data imbalance can be effectively alleviated by integrating multiple decision trees. Adaboost can independently and randomly extract several subsets from the majority class, combine each subset with the minority class data to train to generate multiple base classifiers, and then weight them to form a new classifier. In this paper, comparing the performance of multiple classifiers, while considering the characteristics of the classifiers, a random forest is selected as the base classifier. Then, ensemble learning is used to alleviate data imbalance and improve classifier performance. This section mainly describes the test data, evaluation criteria, and presents 16 different test results tested on different sets of data with varied composition of heartbeat features. The results of different test are compared and analyzed. Clinical data are used to verify system performance.

5.1. Test Data

In this paper, all the tests are carried out on MIT-BIH arrhythmia database. The MIT-BIH arrhythmia database is a standard database to evaluate arrhythmia detection, and is widely used for algorithm verification. The database contains 48 records from 47 subjects. Each record contains two 30-minute ECG lead signals (lead A and lead B). In 48 records, 23 records included normal sinus rhythm (NSR) and a representative group of conventional arrhythmias; the other 25 records included uncommon but clinically significant cardiac abnormalities [49]. According to the ANSI/AAMI EC57 standard proposed by the Association for the advancement of medical instruments (AAMI), there are five categories proposed by AAMI in 2012-specific classification: N (nonectopic beats), S (supraventricular ectopic beats), V (ventricular ectopic beats), F (fusion beats), and Q (unknown beats) [50]. In this paper, 90% data of MIT-BIH arrhythmia database are randomly used for training set and 10% data of MIT-BIH arrhythmia database are used for test set, and there is no intersection between the training data set and test data set. The experimental data statistics can be seen from Table 1. The common heartbeat category example is shown in Figure 10.
Table 1

Experimental data statistics.

CategoryTraining setTest setTotal
N81,5609,03590,595
S2,5282532,781
V6,4507857,235
F72379802
Q7,2487938,041
Figure 10

Common heartbeat category example.

5.2. Evaluation Measurement

As shown in formulas (14)–(17), TP, FP, TN, and FN need to be calculated in this paper to get the result of heartbeat classification. Among them, TP represents N category true-positive heartbeat, FP represents N category false-positive heartbeat, TN represents N category true-negative heartbeat, and FN represents N category false-negative heartbeat. The classification results of other categories of heartbeat are calculated in the same way [39]. Table 2 shows the confusion matrix of classification results, where, N, S, V, F, Q represent the real type of heartbeat, and n, s, v, f, q represent the predicted result.
Table 2

The confusion matrix of classification results.

nsvfq

N N n N s N v N f N q
S S n S s S v S f S q
V V n V s V v V f V q
F F n F s F v F f F q
Q Q n Q s Q v Q f Q q
In this paper, sensitivity, specificity, positive predictivity, and accuracy are used to evaluate the performance of classifiers [39]. Sensitivity (Se) refers to the proportion of samples judged as positive cases in all positive cases. Specificity (Sp) refers to the proportion of samples judged as negative cases in all negative cases. The positive predictive value (+p) is also known as precision. Accuracy (Acc) is the ratio of correctly classified samples to total samples. The calculation formulas (18)–(21) for the above four evaluation indicators are as follows:

5.3. Test Results of Different Feature Combinations

Feature selection is the most effective way to eliminate irrelevant dimensions. In order to compare the effects of different features on the classification of heartbeat, while ensuring the classification performance of the feature vector, considering the system complexity, this project conducted multiple tests using the set A, B, C, D, E with Adaboost + Random Forest models to select the best combination of features. In total, 16 tests are conducted. Among them, tests (1) –(5) compare the effect of single feature classification; tests (6)–(11) compare the classification effect of the pairwise combination of features; tests (12)–(15) compare the classification effect of three-feature combination; test (16) compares the classification effect of four-feature combination. The final result is that for Adaboost + RF, as the number of feature combinations increases, the accuracy is on the rise. Test (17) compares the performance difference between Adaboost + RF and other base classifiers under different feature combinations. Test (1) conducted heartbeat classification using AdaBoost + Random Forest model with set A. The test is performed on 235 feature points in a single heartbeat. The results show that the average accuracy of classification is 98.59%. Table 3 shows the classification results of AdaBoost + Random Forest model tested on the 235 single heartbeat morphological features. Test (2) classified heartbeat based on set B. The results show that the average accuracy of heartbeat classification is 98.84%. Table 4 shows the classification results of the test on the 470 single heartbeat morphological features. Compared with test (1), the results showed that two leads morphology feature is more sufficient than that of the single lead. Test (3) classified heartbeat based on set C. The results show that the average accuracy of classification is 94.37%. But, the sensitivity and positive predictive value of F category are lower. Table 5 shows the classification results of the test on the interval features. The disadvantage of test (3) is that the classification of heartbeat based on interval information alone is not obvious. Test (4) classified heartbeat based on set D. The results show that the sensitivity and positive predictive values of S, V, F, and Q heartbeat are lower, and the average classification accuracy is only 79.92%. Table 6 shows the classification results of the test on the QRS area. The disadvantage of test (4) is that it has poor discrimination only according to QRS area. In test (5), the heartbeat is classified based on set E. The test results show that the sensitivity of S category and F category is low, and the average classification accuracy is 94.68%. Table 7 shows the classification results of the test on the wavelet coefficient. Only using wavelet coefficients cannot describe the heartbeat signal completely, and it is difficult to distinguish the heartbeat with shape close to each other.
Table 3

Performance of AdaBoost + Random Forest model tested on set A.

Prediction resultsEvaluation standard (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,03014009,0301,776134599.9492.9898.5398.73
S5119910219910,69115478.6599.9999.5099.49
V4507391073910,144164694.1499.8497.8899.43
F190105005010,86512963.2999.9998.0399.74
Q1901077377310,15022097.4899.9899.7499.79
Table 4

Performance of AdaBoost + Random Forest model tested on set B.

ResultEvaluation criteria (%)
nsVfqTPTNFPFNSeSp+pAcc
N9,03500009,0351,79311701.093.8798.7298.93
S5819500019510,69205877.071.01.099.47
V3607490074910,150103695.4199.9098.6899.57
F130105605610,86602370.881.01.099.79
Q1000078378310,15201098.741.01.099.91
Table 5

Performance of AdaBoost + Random Forest model tested on set C.

ResultEvaluation criteria (%)
nsvFqTPTNFPFNSeSp+pAcc
N8,926213611418,9261,45845210998.7976.3395.1894.87
S8815660315610,666269761.6699.7585.7198.87
V180557822057810,1006020773.6399.4190.5997.56
F52081811810,853136122.7899.8858.0699.32
Q132010065165110,0876514282.0999.3690.9298.10
Table 6

Performance of AdaBoost + Random Forest model tested on set D.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N8,235173226333688,2357641,14680091.1540.0087.7882.22
S2023090123010,50518722311.8698.2513.8296.25
V339634113863419,81734344443.4496.6249.8592.81
F6201124210,81452772.5399.523.7098.82
Q54389761391399,68247065417.5395.3722.8289.73
Table 7

Performance of AdaBoost + Random Forest model tested on set E.

ResultEvaluation criteria (%)
nsVfqTPTNFPFNSeSp+pAcc
N9,03401009,0341,337573199.9870.0094.4394.76
S206470004710,692020618.851.01.098.11
V21705680056810,151921772.3699.9198.4497.94
F47082402410,86605530.381.01.099.50
Q10300069069010,152010387.011.01.099.05
Test (6) classified heartbeat based on set B, C. The test results show that the average classification accuracy is 98.97%. Table 8 shows the classification results of the test on the 470 single heartbeat morphological features and interval feature. Compared with test (2) and test (3), the sensitivity of S category and F category recognition is improved. In test (7), the heartbeat is classified based on set B, D. The test results show that the average classification accuracy is 98.83%. Table 9 shows the classification results of the test on the 470 single heartbeat morphological features and QRS area. Compared with test (6), it can be seen that the interval features are superior to QRS area information in distinguishing S and F heartbeat types. Test (8) classified heartbeat based on set B, E. The results show that the average classification accuracy is 98.15%. But, the sensitivity of S category and F category is low. They are only 58.49% and 67.09%, respectively. Table 10 shows the classification results of the test on the 470 single heartbeat morphological features and wavelet coefficient. Compared with test (6) and test (7), the deficiency of this feature combination is the lack of interval features, which is an important basis for judging S category and F category of heartbeat. In test (9), the heartbeat is classified based on set C, D. The results show that the average accuracy of classification is 96.59%, but the sensitivity of F category heartbeat is only 39.24%. Table 11 shows the classification results of the test on the interval feature and QRS area. Compared with test (7), it can be seen that it is better to use the 470 single heartbeat morphological features to distinguish F category heartbeat. Test (10) classified heartbeat based on set C, E. The test results show that the average classification accuracy is 98.51%. Table 12 shows the classification results of the test on the wavelet coefficient and interval feature. However, this kind of feature combination cannot effectively distinguish morphologically similar categories of heartbeat, such as N, S category, or V, F category. In test (11), the heartbeat is classified based on set D, E. The results show that the average accuracy of heartbeat classification is 98.24%. Table 13 shows the classification results of the test on the QRS area and wavelet coefficient. Similar to the test (10), this feature combination also cannot effectively distinguish morphologically similar categories of heartbeat.
Table 8

Performance of AdaBoost + Random Forest model tested on set B, C.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,03500009,0351,80910101.094.7198.8999.08
S4920310020310,69205080.241.01.099.54
V2907542175410,150103196.0599.9098.7099.63
F13095705710,86422272.1599.9896.6199.78
Q1000078378310,15201098.741.01.099.91
Table 9

Performance of AdaBoost + Random Forest model tested on set B, D.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,03410009,0341,796114199.9994.0398.7598.95
S5919220019210,69116175.8999.9999.4899.43
V3007532075310,149113295.9299.8998.5699.61
F15095505510,86422469.6299.9896.4999.76
Q1000078378310,15201098.731.01.099.91
Table 10

Performance of AdaBoost + Random Forest model tested on set B, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,03500009,0351,71819201.089.9597.9298.25
S10514800014810,692010558.491.01.099.05
V5107331073310,15195293.3799.9198.7899.45
F17095305310,86512667.0999.9998.1599.75
Q1900077477410,15201997.601.01.099.83
Table 11

Performance of AdaBoost + Random Forest model tested on set C, D.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N8,9855264158,9851,6172935099.4484.6696.8496.86
S70168150016810,68758566.4099.9597.1199.18
V9806830468310,1085210287.0199.4892.9398.59
F39093103110,86244839.2499.9688.5799.52
Q8602070570510,133198888.9099.8197.3799.02
Table 12

Performance of AdaBoost + Random Forest model tested on set C, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,025010009,0251,7791311099.8993.1498.5798.71
S5719240019210,69206175.891.01.099.44
V3107522075210,130303395.7999.7096.1699.42
F150154904910,86423062.0299.9896.0899.71
Q2801076476410,15202996.341.01.099.74
Table 13

Performance of AdaBoost + Random Forest model tested on set D, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,025010009,0251,7431671099.8991.2598.1898.38
S7817410017410,69207968.771.01.099.27
V4607381073810,135254794.0199.7596.7299.34
F160144904910,86513062.0399.9998.0099.72
Q2700076676610,15202796.591.01.099.75
Test (12) classified heartbeat based on set B, C, D. The test (12) results show that the average classification accuracy is 99.09%. Table 14 shows the classification results of the test on the interval feature, QRS area, and the 470 single heartbeat morphological features. Compared with test (9), the 470 single heartbeat morphological features can effectively improve the overall recognition rate of heartbeat classification. Test (13), heartbeat is classified based on set B, C, E. The average accuracy of this experiment is 99.00%. Table 15 shows the classification results of the test on the 470 single heartbeat morphological features, interval feature, and wavelet coefficient. Compared with test (14), the interval features are slightly better than QRS area in overall classification performance. In test (14), the heartbeat is classified based on set B, D, E. The test (14) results show that the sensitivity of S category and F category heartbeat is not high, and the average accuracy of classification is 98.92%. Table 16 shows the classification results of the test on the 470 single heartbeat morphological features, QRS area, and wavelet coefficient. Compared with test (16), the disadvantage of this experiment is the lack of interval feature, which is an important basis for improving the judgment of heartbeat category. In test (15), the heartbeat is classified based on set C, D, E. The test results show that the average accuracy of classification is 98.44%. Table 17 shows the classification results of the test on the interval feature, QRS area, and wavelet coefficient. Compared with test (16), it is necessary to use the 470 single heartbeat morphological features to distinguish heartbeat categories. In test (16), heartbeat is classified based on set B, C, D, E. The test results show that the average classification accuracy is 99.11%. Table 18 shows the classification results of the test on the 470 single heartbeat morphological features, interval features, QRS area, and wavelet coefficient. All the above experiments show that the optimal feature combination is set B, C, D, E. Figure 11 presents the classification results and performance of the optimal feature combination with AdaBoost + Random Forest model.
Table 14

Performance of AdaBoost + Random Forest model tested on set B, C, D.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,03023009,0301,82882599.9495.7199.1099.20
S4021120021110,69024283.4099.9899.0699.59
V2307611076110,145152496.9499.8598.0799.64
F110105805810,86512173.4299.9998.3199.80
Q800078578510,1520898.991.01.099.93
Table 15

Performance of AdaBoost + Random Forest model tested on set B, C, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,02834009,0281,82090799.9295.2999.0199.11
S4420720020710,68934681.8299.9798.5799.55
V2507600076010,144162596.8299.8497.9499.63
F130105515510,86602469.621.01.099.78
Q800078578510,1511898.9999.9999.8799.92
Table 16

Performance of AdaBoost + Random Forest model tested on set B, D, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,02825009,0281,81199799.9294.8298.9299.03
S5619700019710,69025677.8799.9898.9999.47
V2107640076410,143172197.3299.8397.8299.65
F120125505510,86602469.621.01.099.78
Q1000078378310,15201098.741.01.099.91
Table 17

Performance of AdaBoost + Random Forest model tested on set C, D, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,02509019,0251,7631471099.8992.3098.8998.56
S6418900018910,69206474.701.01.099.42
V3607481074810,138223795.2899.7897.1499.46
F180115005010,86512963.2999.9998.0499.73
Q2902076276210,15113196.0999.9999.8799.71
Table 18

Performance of AdaBoost + Random Forest model tested on set B, C, D, E.

ResultEvaluation criteria (%)
nsvfqTPTNFPFNSeSp+pAcc
N9,03113009,0311,83779499.9595.8699.1399.24
S4320910020910,69114482.6199.9999.5299.58
V2007650076510,144162097.4599.8497.9599.67
F100125615610,86602370.881.01.099.79
Q600078778710,1511699.2499.9999.8799.94
Figure 11

Confusion matrix of AdaBoost + Random Forest classification results tested on set B, C, D, E.

As the tree (n_estimators) in the random forest of the base classifier is random, different classification results will be produced when different number of parameters are set. Generally, the number of parameters is too small to fit; and the number of parameters is too large to improve the model significantly. Therefore, the parameter selection is very important. Table 19 is the classification result using different number of parameters of the optimal feature combination. It can be seen from Table 19 that the performance of the classifier is the best when n_estimators are equal to 70.
Table 19

Classification results of different (n_estimators) numbers.

Parameter (n_estimators)2030405060708090
Accuracy (%)98.3498.2598.2898.2999.07 99.11 99.1099.08
The purpose of this experiment is to compare the classification performance of multiple classifiers and find that the random forest algorithm has a better recognition effect on the small sample types in the unbalanced experimental data in this article, so the random forest model is used as the basic classifier for AdaBoost ensemble learning. In test (17), the accuracy is used as the evaluation indicator to compare Gaussian Naive Bayes (GNB), Linear Discriminant Analysis (LDA), Decision Tree (DT), Random Forest (RF), Gradient Lifting Iterative Decision Tree (GBDT), Support Vector Machine (SVM), Logistic Regression (LR), and AdaBoost + Random Forest (AdaBoost + RF) model on different feature sets. Table 20 presents the classification performance of different classifiers. It can be seen from among them that the LDA model also achieves the best result of 94.38% in set B, C, D, E. DT, RF, SVM, and LR models are based on set B, C, D to achieve the best classification effect. The accuracy is 97.85%, 99.08%, 99.04% and 95.87%, respectively. GNB model achieved the best classification result of 85.39% based on set D, and GDBT model achieved the best classification effect based on set B, C,E. The best classification result is based on AdaBoost + Random Forest model with set B, C, D, E. The average accuracy of the classification is 99.11%. In this paper, after comparing the classification performance of these classifiers under each feature combination, the Random Forest with the best performance is selected as the base classifier for ensemble learning. Tests (1)–(16) are the detailed results of the classification of AdaBoost + Random Forest.
Table 20

Accuracy of different classifiers performed with multiple-feature combinations.

Feature setClassifiers
ABCDEGNBLDALRSVMDTGBDTRF Adaboost + RF
49.0590.0591.8198.6897.0997.6598.6498.59
55.8692.7993.9498.9697.7398.3798.9198.84
82.0682.6982.8591.8991.5191.8394.4594.37
85.39 82.5582.5585.4279.6285.5579.1579.92
83.0490.1991.8696.8896.4997.6598.1794.68
56.3893.3194.4799.0097.7398.5398.9198.97
69.6392.7793.9298.9697.7898.3999.0298.83
69.1492.7693.9298.5197.4198.5398.9298.15
85.2383.9985.0595.0894.2394.6696.8896.59
84.0992.1993.6097.2596.9898.1498.4398.51
83.0390.2491.8896.9196.6597.6098.1698.24
56.6394.16 95.87 99.04 97.85 98.66 99.08 99.09
69.6394.1695.8198.6697.78 98.70 99.0498.99
69.0992.9594.0498.5197.2498.4598.8598.92
84.0992.2593.6297.2897.0298.1598.4698.44
69.59 94.38 95.8298.6697.7398.6499.00 99.11

5.4. Comparative Results with Other Implemented Classification Methods

The system developed in this paper performs better on classification indicators [43, 51–54]. Table 21 presents comparison with previous studies. Compared with references [21, 55–58], the sensitivity and positive predictive value of N, S, and V heartbeats have been greatly improved. Compared with other methods, the accuracy of heartbeat classification is improved. The experimental results show that the method has the advantages of distinguishing N (nonectopic beats), V (ventricular ectopic beats), and Q (unknown beats). AdaBoost + Random Forest model is used to classify arrhythmia, and an accurate and objective heartbeat analysis system is established.
Table 21

Comparison results with other implemented classification methods.

ReferenceFeaturesClassifierPerformance
Zhang et al. [21]ECG MorphologyRR intervalSVMAcc = 86.66%
Se n = 88.94%; +Pn = 98.98%
Se s = 79.06%; +Ps = 35.98%
Se v = 85.48%; +Pv = 92.75%
Se f = 93.81%; +Pf = 13.73%

Ghorbani Afkhami et al. [54]HOSRR intervalDTAcc = 99.70%
Se n = 97.37%; +Pn = 98.40%
Se s = 86.50%; +Ps = 90.90%
Se v = 95.99%; +Pv = 77.63%
Se f = 11.86%; +Pf = 24.21%

Yang et al. [53]PCAnetLinearSVMAcc = 97.77%
+P n = 98.05%
+P s = 92.80%
+Pv = 94.59%
+P f = 91.75%
+P q = 99.50%

Wang et al. [43]Medical featuresRFAcc = 99.08%
Statistical features
Morphological features

Ji et al. [56]ECG morphologyFaster R-CNNAcc = 99.21%
Se = 98.06%; Sp = 99.45%

Sharma et al. [57]Morphological featuresKNNAcc = 98.10%
Wavelet transform Se n = 99.59%; Spn = 91.92%; +Pn = 98.34%
Se s = 73.64%; Sps = 99.84%; +Ps = 92.09%
Se v = 92.11%; Spv = 99.75%; +Pv = 96.37%
Se f = 64.46%; Spf = 99.94% +Pf = 88.38%

Li et al. [58]RR intervalsMorphological featuresCraftNetAcc = 89.25%
Se n = 88.16%; Spn = 94.34%
Se s = 85.37%; Sps = 94.85%
Se v = 94.53%; Spv = 99.70%
Se f = 88.92%; Spf = 94.28%

ProposedECG morphologyAdaBoost + RFAcc = 99.11%
Intervals Se n = 99.95%; Spn = 95.86%; +Pn = 99.13%
QRS area Se s = 82.61%; Sps = 99.99%; +Ps = 99.52%
Wavelet coefficients Se v = 97.45%; Spv = 99.84%; +Pv = 97.95%
Se f = 70.88%; Spf = 100%; +Pf = 100%
Se q = 99.24%; Spq = 99.99%; +Pq = 99.87%

5.5. Clinical Data Test

In order to verify the actual effect, real data were collected for testing. The disease tag is the result given by the doctor. The format is float, 32 bit binary format, the sampling rate is 1000, and each data have 12 leads. Figure 12 is the presented results of the ECG classification. Therefore, this system has evident clinical significance and practical value in the diagnosis of arrhythmia.
Figure 12

The result of clinical application of the algorithm.

6. Conclusion

A novel, effective system of arrhythmia classification based on multi-feature fusion with optimal feature selection using AdaBoost + Random Forest model is presented in this paper. Based on this system, doctors can check the similarity and difference in features through machine learning model. The classification system of arrhythmia proposed in this paper has high recognition rate and is of great significance in clinical application. Although cardiac classification has made significant progress in the diagnosis of cardiovascular diseases, the sensitivity of this method of S and F category heartbeat needs to be improved. In order to achieve better classification effect, the future research will focus on improving the recognition performance of S and F category heartbeat. Highlights of this paper are as follows: This system accomplished automation from ECG signal collection, intelligent analysis to result presentation, thereby effectively improving the efficiency of doctor's diagnosis. In the case of unbalanced ECG data set, a novel AdaBoost + Random Forest approach is proposed for the heartbeat classification system. The framework is used to learn the potential correlation between an individual heartbeat internal data and the relationship of the different individual heartbeats. Among a total 8 of classifiers examined, the AdaBoost + Random Forest is capable of achieving the best on the obtained optimal feature set.
  19 in total

1.  The impact of the MIT-BIH arrhythmia database.

Authors:  G B Moody; R G Mark
Journal:  IEEE Eng Med Biol Mag       Date:  2001 May-Jun

2.  ECG-based heartbeat classification for arrhythmia detection: A survey.

Authors:  Eduardo José da S Luz; William Robson Schwartz; Guillermo Cámara-Chávez; David Menotti
Journal:  Comput Methods Programs Biomed       Date:  2015-12-30       Impact factor: 5.428

3.  Optimal data fusion for the improvement of QRS complex detection in multi-channel ECG recordings.

Authors:  Carlos A Ledezma; Miguel Altuve
Journal:  Med Biol Eng Comput       Date:  2019-05-17       Impact factor: 2.602

4.  An Improved Convolutional Neural Network Based Approach for Automated Heartbeat Classification.

Authors:  Haoren Wang; Haotian Shi; Xiaojun Chen; Liqun Zhao; Yixiang Huang; Chengliang Liu
Journal:  J Med Syst       Date:  2019-12-18       Impact factor: 4.460

5.  Medical Decision Support System for Diagnosis of Heart Arrhythmia using DWT and Random Forests Classifier.

Authors:  Emina Alickovic; Abdulhamit Subasi
Journal:  J Med Syst       Date:  2016-02-27       Impact factor: 4.460

6.  Ventricular ectopic beat detection using a wavelet transform and a convolutional neural network.

Authors:  Qichen Li; Chengyu Liu; Qiao Li; Supreeth P Shashikumar; Shamim Nemati; Zichao Shen; Gari D Clifford
Journal:  Physiol Meas       Date:  2019-06-04       Impact factor: 2.833

7.  A deep convolutional neural network model to classify heartbeats.

Authors:  U Rajendra Acharya; Shu Lih Oh; Yuki Hagiwara; Jen Hong Tan; Muhammad Adam; Arkadiusz Gertych; Ru San Tan
Journal:  Comput Biol Med       Date:  2017-08-24       Impact factor: 4.589

8.  Arrhythmia Recognition and Classification Using ECG Morphology and Segment Feature Analysis.

Authors:  Wenliang Zhu; Xiaohe Chen; Yan Wang; Lirong Wang
Journal:  IEEE/ACM Trans Comput Biol Bioinform       Date:  2018-06-12       Impact factor: 3.710

9.  Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network.

Authors:  Awni Y Hannun; Pranav Rajpurkar; Masoumeh Haghpanahi; Geoffrey H Tison; Codie Bourn; Mintu P Turakhia; Andrew Y Ng
Journal:  Nat Med       Date:  2019-01-07       Impact factor: 53.440

10.  Electrocardiogram Classification Based on Faster Regions with Convolutional Neural Network.

Authors:  Yinsheng Ji; Sen Zhang; Wendong Xiao
Journal:  Sensors (Basel)       Date:  2019-06-05       Impact factor: 3.576

View more
  2 in total

1.  Deducing Leading Factors of Spatial Distribution of Carbon Reserves in Nanjing Metropolitan Area Based on Random Forest Model.

Authors:  Jiefu Xue; Jun Yan
Journal:  Comput Intell Neurosci       Date:  2022-08-25

2.  Using Decision Tree Classification and AdaBoost Classification to Build the Abnormal Data Monitoring System of Financial Accounting in Colleges and Universities.

Authors:  Yan Jiang
Journal:  Comput Intell Neurosci       Date:  2022-09-16
  2 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.