Literature DB >> 35925979

Accurate detection of atrial fibrillation events with R-R intervals from ECG signals.

Junbo Duan1, Qing Wang2, Bo Zhang1, Chen Liu1, Chenrui Li1, Lei Wang3.   

Abstract

Atrial fibrillation (AF) is a typical category of arrhythmia. Clinical diagnosis of AF is based on the detection of abnormal R-R intervals (RRIs) with an electrocardiogram (ECG). Previous studies considered this detection problem as a classification problem and focused on extracting a number of features. In this study we demonstrate that instead of using any specific numerical characteristic as the input feature, the probability density of RRIs from ECG conserves comprehensive statistical information; hence, is a natural and efficient input feature for AF detection. Incorporated with a support vector machine as the classifier, results on the MIT-BIH database indicates that the proposed method is a simple and accurate approach for AF detection in terms of accuracy, sensitivity, and specificity.

Entities:  

Mesh:

Year:  2022        PMID: 35925979      PMCID: PMC9352004          DOI: 10.1371/journal.pone.0271596

Source DB:  PubMed          Journal:  PLoS One        ISSN: 1932-6203            Impact factor:   3.752


1 Introduction

Atrial fibrillation (AF or AFIB) is a type of abnormal heart rhythm (arrhythmia) characterized by the rapid, irregular beating of the heart’s upper chambers, resulting in the pooling and clotting of blood inside the heart, thereby increasing the risk of heart attack, failure, and stroke [1]. The symptoms of AF frequently begin with short periods of arrhythmia, such as abnormal beating or atrial flutter, followed by longer arrhythmia periods, sometimes even lasting for hours, accompanied occasionally with heart palpitations, fainting, lightheadedness, shortness of breath, or chest pain [2]. The clinical diagnosis of AF is based on the surface electrocardiogram (ECG), and because of the disorganized electrical activity, AF is characterised by the absence of a P wave. However, because the amplitude of the P wave is relatively low (also a heavy baseline), making its detection difficult, the R-R interval (RRI), which reflects the ventricular interbeat, was proposed as a significant biomarker for AF detection [3]. Compared with RRI in regular rhythm segments, consecutive RRIs during AF episodes exhibit low averages and high fluctuations, reflecting rapid and irregular heart beating. Fig 1 illustrates a typical ECG record (04043) from the MIT-BIH atrial fibrillation database (AFDB) [4, 5], which demonstrates the different patterns of RRIs (red line) in and off AF segments. Since AF episodes duration may change from a few seconds to hours, the chance of AF detection depends heavily on the monitoring period of the ECG. To maximize the probability of AF detection, long-term monitoring of the ECG is required, for example, the use of a Holter. However, the visual inspection of twenty-four-hour-long ECG records is time consuming for clinicians. Hence, an automated AF detection method is required. Another issue to be addressed is the distortion in the long-term record introduced by physical activities; therefore, an accurate AF detection method is needed. With the rapid development of wearable and smart devices, memory-efficient, real-time, automatic, and accurate AF detection methods have become possible [6-8].
Fig 1

Demonstration of signals and annotations of AFDB (record 04043).

Blue solid and green dashed lines indicate the ECG signals of two channels, red circled line is the RRI, and black thick line is the AF label (1 and 0 indicate AF and normal, respectively). It can be easily observed that the RRIs of AF and non-AF segments exhibit different patterns.

Demonstration of signals and annotations of AFDB (record 04043).

Blue solid and green dashed lines indicate the ECG signals of two channels, red circled line is the RRI, and black thick line is the AF label (1 and 0 indicate AF and normal, respectively). It can be easily observed that the RRIs of AF and non-AF segments exhibit different patterns. As illustrated in Fig 2, the histogram of the RRI of AF events (panel (a)) exhibits a lower mean, longer tail, and is left-skewed, compared with that of normal events (panel (b)). These findings are evident from Fig 1(b). Based on these findings, mathematical expectation, variance/deviation, skewness, difference of RRIs, and other higher-order statistics were proposed as features for classification.
Fig 2

The average histogram of RRIs.

(a) represents AF records of AFDB, and (b) represents normal records from NSRDB.

The average histogram of RRIs.

(a) represents AF records of AFDB, and (b) represents normal records from NSRDB. Table 1 lists 35 published studies that have been conducted to develop efficient AF detection methods. Tateno and Glass [3] first noticed the increase in the variation on AF episodes and hence proposed the coefficient of variation as a feature of RRI and ΔRRI (the first-order difference of RRI). Subsequently, they used statistical hypothesis testing to verify the existence of AF events. They also proposed the use of the Kolmogorov-Smirnov test to compare the histograms of AF RRIs and normal one. Many subsequent studies considered this detection problem as a classification problem and focused on the extraction of various features and the design of classifiers. These features include entropy [9-13], mean and/or median (with or without normalization), root mean square and/or variance [14-16], quantiles [16, 17], median absolute deviation [10, 16, 17], coefficients of wavelet transformation [12, 13], Markov score [18] of RRI and/or ΔRRI, or a combination of several features [10, 11, 16, 19, 20]. In recent studies, deep learning algorithms such as long short-term memory (LSTM) [21, 22], and others [20, 23–25] have been used to process original signals without feature extraction.
Table 1

List of published methods (in chronological order).

referencefeatureclassifierdatabaseACCSENSPEPRE
[3]RRI and ΔRRIK-S testAFDB,MITDBNA86.6084.30NA
[14]RRI(variance)thresholdingAFDBNA96.0089.00NA
[26]RRI and ΔRRIfixed ruleAFDBNA93.0097.00NA
[18]RRI(Markov scores)thresholdingHolter ECGs,MITDB95.43939898.01*
[27]RRIthresholdingAFDB,MITDB99.194.495.1106.5*
[28]RRI and ΔRRIthresholdingAFDB,NSRDBNA96.198.1NA
[9]RRI(SampEn)logistic regressionAFDB97.7591.0098.0063.00
[29]RRI(map)thresholdingAFDB,MITDB,NSRDBNA95.9095.40NA
[19]RRI(entropys, statistical characteristics), HRSVMAFDB,NSRDB,MITDB98.8499.0799.7298.27
[30]ΔRRI (maximum), F wavethresholdingAFDB,MITDB,NSRDB94.6294.1395.58*97.67
[31]RRI(ShEn)thresholdingLTAFDB,AFDB,MITDB,NSRDB96.0596.7295.0796.61
[32]P wave (morphology and statistical features)thresholdingAFDB97.8898.0991.6679.17
[15]HR(variance)SVMMITDB97.5095.8198.4497.16*
[33]RRI(irregularity, Bigeminy suppression)thresholdingAFDB,NSRDBNA98.0098.20NA
[34]TQI(RWE)NAAFDB,synthesized ECG recordings93.3291.2194.5390.53*
[35]RRI(entropy)thresholdingAFDB,MITDB96.3896.3996.380*
[10]RRI(CoSEn, CV, RMSSD, MAD)RF + KNNMITDB,AFDB,LTAFDB,NSRDB,…97.3392.8098.3092.10
[36]RRI(ShEn)ANN(BP)AFDB89.7991.0489.0183.79*
[11]RRI(ShEn, SampEn, CoSEn, …)SVMAFDBNA94.2798.84NA
[37]RRI(dissimilarity index)ensemble classifierAFDB,NSRDB97.7897.0497.9692.05*
[38]ΔRRI(entropy, probability density distribution)LSVMAFDB,MITDB,NSRDB,LTAFDB95.9095.3096.3094.10
[21]RRI(windowed sequence)RNN+LSTMAFDB98.6798.5198.32100.79*
[12]ECG(log energy entropy, permutation entropy)RFAFDB96.8495.8097.6096.69*
[16]HR(statistical characteristics)fixed ruleAFDB95.6295.4296.1294.97
[39]RRI(RCV, SKP, Lempel-Ziv)SVMAFDB96.0995.8196.4897.43*
[22]RRI(windowed sequence)CNN+RNN+LSTMAFDB,MITDB,NSRDB97.898.9896.9595.90*
[23]RRI(sequences)CNN+RNN+LSTMprivate dateset89.6794.293.13110.56*
[40]RRI(entropy, power spectrum …)SVMAFDB90.00100.0080.0083.33*
[41]RRI(statistical characteristics)SVCmAFDB,MITDB94.9996.3492.895.6*
[24]ECG(fractional norm)H-ELMAFDB,MITDB99.9399.86100100.07*
[13]RRI(frequency-domain)decision treeAFDB98.997.9399.6398.32*
[42]HR(ShEn)thresholdingMITDB98.1099.2097.3096.39*
[25]ECG(original wave)BiRNNAFDB82.4190.5379.5461*
[17]HR(irregularity)SVMAFDB98.6698.9498.3698.86
[20]ΔRRI, RRI, morphologyCatBoostAFDB99.6299.6199.6499.82*

Asterisk (*) indicates that this value is deduced from the other three criteria with formulates in S1 File. Abbreviations: AFDB (atrial fibrillation database), ANN (artificial neural network), BiRNN (bidirectional recurrent neural networks), BP (back propagation), CNN (convolutional neural network), CoSEn (coefficient of sample entropy), CV (coefficient of variance), H-ELM (hierarchical extreme learning machine), HR (heart rate), K-S (Kolmogorov-Smirnov), KNN (k-nearest neighbor), LSTM (long short-term memory), LSVM (linear support vector machine), LTAFDB (long term atrial fibrillation database), MAD (median absolute deviation), MITDB (MIT-BIH arrhythmia database), NA (not applicable), NSRDB (normal sinus rhythm database), RCV (robust coefficient of variation), RF (random forest), RMSSD (root mean square of the successive differences), RNN (recurrent neural network), RRI (R-R interval), SampEn (sample entropy), ShEn (Shannon entropy), SKP (skewness parameter), SVCm (supervised contractive map), SVM (support vector machine), TQI (T-Q interval).

Asterisk (*) indicates that this value is deduced from the other three criteria with formulates in S1 File. Abbreviations: AFDB (atrial fibrillation database), ANN (artificial neural network), BiRNN (bidirectional recurrent neural networks), BP (back propagation), CNN (convolutional neural network), CoSEn (coefficient of sample entropy), CV (coefficient of variance), H-ELM (hierarchical extreme learning machine), HR (heart rate), K-S (Kolmogorov-Smirnov), KNN (k-nearest neighbor), LSTM (long short-term memory), LSVM (linear support vector machine), LTAFDB (long term atrial fibrillation database), MAD (median absolute deviation), MITDB (MIT-BIH arrhythmia database), NA (not applicable), NSRDB (normal sinus rhythm database), RCV (robust coefficient of variation), RF (random forest), RMSSD (root mean square of the successive differences), RNN (recurrent neural network), RRI (R-R interval), SampEn (sample entropy), ShEn (Shannon entropy), SKP (skewness parameter), SVCm (supervised contractive map), SVM (support vector machine), TQI (T-Q interval). In this study, from a statistical perspective, we consider that instead of employing any numerical characteristic (i.e., mean, variance, skewness, etc.) as a specific feature, the probability density function conserves comprehensive information and hence enables high-performance classification. Consequently, we propose the use of a histogram of the RRI from an ECG as a natural and general feature and the widely used support vector machine (SVM) as the classifier.

2 Materials and methods

2.1 Databases

This study employed the MIT-BIH atrial fibrillation database (AFDB) [4, 5], which is widely used in arrhythmia studies. This database includes 25 records of human subjects with AF, and each record includes two-channel ECG signals with a sample frequency of 250 Hz and a 12-bit A/D resolution. Furthermore, this database contains clinical annotations and QRS calls, and supports online retrieval with the easy-to-use toolbox waveform database (WFDB) [43, 44]. Note that R waves were already called by WFDB, so this paper do not cover the detection of R waves from an ECG signal. Researchers interested in this topic are referred to fruitful literature [45-48]. Fig 1 illustrates a typical record (ID 04043) of the AFDB, including two ECG channels (blue and green lines), the RRI (red line), and AF label (black line). The MIT-BIH long-term atrial fibrillation database (LTAFDB) [49, 50] was also employed as a positive test dataset, which includes 84 long-term (24 hours) ECG recordings, with the same sampling parameters as the AFDB. As in normal control cases, to evaluate the specificity, this study also employed the MIT-BIH normal sinus rhythm database (NSRDB) [51, 52], which includes long-term ECG records of 18 human subjects who exhibited no significant signs of arrhythmia. All 127 (25 + 18 + 84) records were downloaded using MATLAB (the pseudo code is listed in S2 File).

2.2 Performance criteria

Three widely used criteria were employed to quantify AF detection performance: accuracy (ACC), sensitivity (SEN), and specificity (SPE). SEN is referred to as the true positive rate, which is used to measure how well a method can identify real patients, and is defined as the proportion of true positives among all positive subjects. SPE is referred to as the true negative rate, which is used to measure how well a method can identify a normal person and is defined as the proportion of true negatives among all negative subjects. For diagnosis and screening, there exists a trade-off between SEN and SPE; therefore, ACC is commonly used to consider SEN and SPE integrally. ACC is defined as the proportion of the sum of true positives and true negatives among all the samples. Notably, precision (PRE), also known as positive predictive value (PPV), is frequently employed in several studies and is defined as the proportion of true positives among all detected positive cases. However, among these four criteria (ACC, SEN, SPE, and PRE) only three are independent, and the fourth can be calculated depending on the other three (see S1 File). Therefore in our study, only ACC, SEN, and SPE were evaluated, and PRE was not considered. Among the studies listed in Table 1, a few studies provided PRE, while others provided ACC; hence, we used the formulas mentioned in S1 File to convert among them, and the resultant values have been labelled with asterisks.

2.3 Method

2.3.1 Data pre-processing

After 127 records were downloaded, the following pre-processing steps were followed: RRI values were re-scaled from the sample index to milliseconds by dividing with the sampling frequency; Annotations and comments of AFDB and LTAFDB were resolved, and RRI regions with the string ‘(AFIB’ were selected as positive regions; All RRI regions of NSRDB were selected as negative regions; Both positive and negative regions were cut to segments, each including 30 PPIs; A histogram with M bins of each RRI segment was calculated, and stored in a row vector of size M; The N0 row vectors from NSRDB were cascaded vertically to form the negative sample matrix 0, and the same method was employed for vectors from AFDB and LTAFDB, yielding matrices 1 and 2 of height N1 and N2, respectively. After pre-processing, we obtained three sample matrices 0, 1, and 2, with width M, and height N0 = 58742, N1 = 16817, and N2 = 101376, respectively.

2.3.2 Classifier

Soft-margin support vector machine (SVM) [53, 54] was trained as the classifier, which is formally defined as the following optimization problem (the Lagrangian dual form): where stores the N training samples, each sample is a row vector of length M; stores the labels of samples (1 for AF, and -1 for normal); is an unknown weight vector to be optimized; sum() is the sum of all elements in ; ⊙ is the point-wise multiplication (the Khatri-Rao product); c is a box constraint parameter, which controls the strength of regularization; is the kernel matrix of , with element k = κ(, ) is the Gaussian kernel (or radial basis function): where σ is a scale parameter. To optimize problem (1), sequential minimal optimization (SMO) [55] was utilized as the solver. Once is obtained, the bias parameter b can be calculated as: For a test PPI vector , the predicting function read: and if p() > 0, an AF event is detected.

3 Results

3.1 Kernel function

First, we compared the performance of the Gaussian kernel function (2) with that of the linear kernel function , and the third-order polynomial kernel function . At this step, all other parameters were set to default values (scale parameter σ = 1, box constraint parameter c = 1, and number of bins M = 10). The SVM classifier was trained with the positive and negative sample matrices 1 and 0 by constructing a kernel matrix of size (N1 + N0) × (N1 + N0), and a training label y with N1 ones and N0 negative ones. The optimize problem (1) was solved with SMO solver to train the weight vector α; then, the bias parameter b was calculated based on Eq (3). Subsequently, the same samples were tested with the trained SVM, and the performance criteria were evaluated. Fig 3 illustrates the performance with different kernel functions. It was demonstrated that the radial basis function was the best, and this kernel was chosen in the sequel.
Fig 3

The performance with different kernel functions.

3.2 Number of histogram bins

Subsequently, we tested the impact of the histogram bin number M on detection performance. Because approximately 99% of the RRI values lie within the region of 50 ms and 2e3 ms, the centres of the first and last bins were set to 50 ms and 2e3 ms, respectively. Other M − 2 bin centres were located linearly within this region. RRI values beyond this region were assigned to either the first or the last bin. The training of SVM and performance evaluation were the same as in the previous experiment. Fig 4 demonstrates the results, which indicate that the detection performance increases with an increase in M and reaches the ceiling at 30. Therefore, in the following experiments, M was fixed at 30.
Fig 4

The performance with different histogram bin numbers.

3.3 Cross-validation with scale and box constraint parameters

The scale parameter σ and box constraint parameter impacted the training significantly; hence, we used ten-fold cross-validation to optimize these two parameters. Both σ and c were sampled on a two-dimensional logarithmic grid. The training of SVM, performance evaluation, and training dateset were the same as in the previous experiment. Fig 5 demonstrates the results in which panel (b) indicates that a high SEN performance requires large-scale and box constraint parameters, and panel (c) indicates that a high SPE performance requires small-scale and box constraint parameters. As mentioned, ACC considers both SEN and SPE, and the best performance was achieved at σ = 3.2, and c = 1 (the yellow star in panel (a)). Table 2 lists the ten-fold cross-validation performance in this setting.
Fig 5

Ten-fold cross validation performance with different scale and box constraint parameters.

Table 2

Performance of ten-fold cross validation at yellow star point in Fig 5.

CV IDACCSENSPE
10.98760.98780.9875
20.98390.98620.9823
30.98590.98960.9832
40.98490.98120.9878
50.98470.98650.9833
60.98370.98530.9826
70.98390.98280.9848
80.98540.98520.9856
90.98270.98360.9821
100.98050.98010.9808
average0.9843±0.00190.9848±0.00290.9840±0.0024

3.4 Independent dataset testing

In the last experiment, the SVM model was trained with AFDB (N1 = 16817) and NSRDB (N0 = 58742) as positive and negative samples, respectively. Model parameters were set according to the results of previous experiments. Subsequently, LTAFDB (N2 = 101376) was used as the independent positive testing dataset. The confusion matrix is shown in Table 3, and detection results for ACC, SEN, and SPE were 0.9697, 0.9524, and 0.9994, respectively, thus indicating a good generalization performance.
Table 3

Confusion matrix of independent dataset testing.

predicted AFpredicted normal
AF965534823
normal3458708

4 Conclusion and discussion

We conclude that an accurate detection method for atrial fibrillation events based on the RR interval measured from an ECG signal was proposed in this paper. The advantage of the proposed method over the methods described in literature is that: instead of using any specific numerical characteristic (e.g., entropy, mean, median, root mean square, variance, quantiles, etc. or a combination of several characteristics) as the input feature, the probability density conserves all statistical information; hence, is natural, comprehensive, easy-computing and efficient as the input features. On the MIT-BIH databases, the proposed method achieved 0.9843±0.0019, 0.9848±0.0029, and 0.9840±0.0024, in terms of ACC, SEN, and SPE, respectively, for a ten-fold cross-validation, and 0.9697, 0.9524, and 0.9994, respectively, for an independent testing, indicating that the proposed method is effective in AF detection. Note that some studies highlighted the difference between the histograms of PPIs of AF and normal one, and proposed the use of a histogram to detect AF, but the manner in which they utilize histograms is quite different from that in this study. For example, Tateno and Glass [3] observed an increase in variation in AF episodes, and proposed using the Kolmogorov-Smirnov test to compare the histogram of AF RRI and normal RRI; Petrucci et al. [26] calculated several statistics, such as the distribution width based on the histogram of RRI prematurity and ΔRRI, and used a geometric test to detect AF. Alternatively, this study proposes using the histogram as the feature vector and an input to the support vector machine for classification, which is the main contribution of this study.

Relations between accuracy (ACC), sensitivity (SEN), specificity (SPE), and precision (PRE).

(PDF) Click here for additional data file.

Dataset downloading.

(PDF) Click here for additional data file.
  36 in total

1.  PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals.

Authors:  A L Goldberger; L A Amaral; L Glass; J M Hausdorff; P C Ivanov; R G Mark; J E Mietus; G B Moody; C K Peng; H E Stanley
Journal:  Circulation       Date:  2000-06-13       Impact factor: 29.690

2.  The use of the Hilbert transform in ECG signal analysis.

Authors:  D Benitez; P A Gaydecki; A Zaidi; A P Fitzpatrick
Journal:  Comput Biol Med       Date:  2001-09       Impact factor: 4.589

Review 3.  Wearables and the medical revolution.

Authors:  Jessilyn Dunn; Ryan Runge; Michael Snyder
Journal:  Per Med       Date:  2018-09-27       Impact factor: 2.512

4.  Probability density distribution of delta RR intervals: a novel method for the detection of atrial fibrillation.

Authors:  Yanjun Li; Xiaoying Tang; Ancong Wang; Hui Tang
Journal:  Australas Phys Eng Sci Med       Date:  2017-06-15       Impact factor: 1.430

5.  A novel approach for automatic detection of Atrial Fibrillation based on Inter Beat Intervals and Support Vector Machine.

Authors:  Rasmus S Andersen; Erik S Poulsen; Sadasivan Puthusserypady
Journal:  Conf Proc IEEE Eng Med Biol Soc       Date:  2017-07

6.  Automated detection of atrial fibrillation using R-R intervals and multivariate-based classification.

Authors:  Alan Kennedy; Dewar D Finlay; Daniel Guldenring; Raymond R Bond; Kieran Moran; James McLaughlin
Journal:  J Electrocardiol       Date:  2016-08-12       Impact factor: 1.438

7.  Automated detection of atrial fibrillation using long short-term memory network with RR interval signals.

Authors:  Oliver Faust; Alex Shenfield; Murtadha Kareem; Tan Ru San; Hamido Fujita; U Rajendra Acharya
Journal:  Comput Biol Med       Date:  2018-07-17       Impact factor: 4.589

8.  Computer Aided Diagnosis for atrial fibrillation based on new artificial adaptive systems.

Authors:  Paolo Massimo Buscema; Enzo Grossi; Giulia Massini; Marco Breda; Francesca Della Torre
Journal:  Comput Methods Programs Biomed       Date:  2020-02-19       Impact factor: 5.428

9.  Deep Learning Approach for Highly Specific Atrial Fibrillation and Flutter Detection based on RR Intervals.

Authors:  Marija D Ivanovic; Vladimir Atanasoski; Alexei Shvilkin; Ljupco Hadzievski; Aleksandra Maluckov
Journal:  Conf Proc IEEE Eng Med Biol Soc       Date:  2019-07

10.  Automatic online detection of atrial fibrillation based on symbolic dynamics and Shannon entropy.

Authors:  Xiaolin Zhou; Hongxia Ding; Benjamin Ung; Emma Pickwell-MacPherson; Yuanting Zhang
Journal:  Biomed Eng Online       Date:  2014-02-17       Impact factor: 2.819

View more

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