# Determination of Parameters for an Entropy-Based Atrial Fibrillation Detector

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

_{AF}, which showed a high classification accuracy in identifying AF and non-AF rhythms. As a variation of entropy measures, Entropy

_{AF}has two parameters that need to be initialized before the calculation: (1) tolerance threshold r and (2) similarity weight n. In this study, a comprehensive analysis for the two parameters determination was presented, aiming to achieve a high detection accuracy for AF events. Data were from the MIT-BIH AF database. RR interval recordings were segmented using a 30-beat time window. The parameters r and n were initialized from a relatively small value, then gradually increased, and finally the best parameter combination was determined using grid searching. AUC (area under curve) values from the receiver operator characteristic curve (ROC) were compared under different parameter combinations of parameters r and n, and the results demonstrated that the selection of these two parameters plays an important role in AF/non-AF classification. Small values of parameters r and n can lead to a better detection accuracy than other selections. The best AUC value for AF detection was 98.15%, and the corresponding parameter combinations for Entropy

_{AF}were as follows: r = 0.01, n = 0.0625, 0.125, 0.25, or 0.5; r = 0.05 and n = 0.0625, 0.125, or 0.25; and r = 0.10 and n = 0.0625 or 0.125.

## 1. Introduction

_{AF}[24], which has a better discrimination ability for identifying the AF rhythm from the normal sinus rhythm, for both the MIT-BIH AF database and the clinical wearable AF database.

_{AF}calculation: (1) embedding dimension m, (2) tolerance threshold r, and (3) similarity weight n. Parameter m determines the length of vectors to be compared, parameter r is a distance threshold for accepting similar patterns between two vectors, and parameter n is a weight for similarity. Parameter m depends on the length of time series, and in the current study, as the RR interval time series for the AF rhythm analysis is limited to 30 RR interval segments, parameter m was set as 1 according to the previous recommendation [21]. So, how to choose the two remaining parameters r and n is a problem that needs to be solved urgently. This study addressed the issue and tested the effect on different combinations of the two parameters on the accuracy of detecting the AF rhythm. The test was performed on an open-access MIT-BIH AF database in order to determine the optimal parameter combination.

## 2. Methods

#### 2.1. Data

#### 2.2. Entropy_{AF} Method

#### 2.3. Parameter Test

_{AF}value was calculated under different parameter settings. The criterion for achieving maximal ROC was used for optimizing the parameters r and n. In addition, the selection of m might depend on the time series length N and, as suggested from the previous studies [25,26,27,28], parameters m and N should meet the requirement of $N\approx {10}^{m}~{10}^{m+1}$. Thus, the embedding dimension m was set as 1 due to the short RR segments (30 RR intervals length).

_{AF}values were firstly plotted to form a straightforward observation under the representative parameter combinations. Then, the overview of AUC results for classifying AF and non-AF rhythm types was presented. Finally, an inferential analysis of the effect of parameter combination on the entropy output was conducted using an in-depth analysis of the vector distance calculation in Entropy

_{AF}.

## 3. Results

#### 3.1. Classification Results with Different Parameter Combinations

_{AF}values under different parameter combinations, where blue bars indicate AF and orange bars represent non-AF segments. Figure 1 shows the results when r is set as 0.05 and n varies from 0.125 to 4. We can observe that the distribution of Entropy

_{AF}values for AF and non-AF segments separates differently when using different n values. The separation between the two groups with small values (n = 0.125 or 0.5) is more visually obvious than that with large values (n = 2 or 4), indicating the different classification abilities of Entropy

_{AF}measurement when using different parameter combinations. These differences were quantitatively evaluated by the AUC metric as follows: 98.15% for n = 0.125, 98.08% for n = 0.5, 94.11% for n = 1, 82.94% for n = 2, and 78.06% for n = 4. Figure 2 shows the results when n is set as 0.125 and r varies from 0.05 to 0.9. We can still observe that the distribution of Entropy

_{AF}values for AF and non-AF segments separates differently when using different r values. The separation between the two groups with a small value (r = 0.05) is still more visually obvious than that with a large value (r = 0.9), quantitatively confirmed by the different AUC values, as follows: 98.15% for r = 0.05 or 0.1, 97.95% for r = 0.2, 93.93% for r = 0.5, and 88.27% for r = 0.9. These two figures indicate that Entropy

_{AF}can distinguish AF from non-AF rhythms better when the parameters of n and r have small values.

#### 3.2. Inferential Analysis from the Calculation of Vector Distances

_{AF}only depends on the vector similarity degree when dimension m increases to $m+1$, and the equation is as follows:

_{AF}for the AF and N rhythms both decreased, as shown in Figure 1, sd the increased n generated the shrinkage of ${\left(d{X}_{i,j}^{m}\right)}^{n}$ as shown in Equation (3) and the diminished ${\left(d{X}_{i,j}^{m}\right)}^{n}$ induced the decrease of entropy values. However, the entropy values in the AF rhythm changed more rapidly than those in the N rhythms. Thus, when n increased to 4, the two groups almost merged with each other entirely, resulting in a difficult distinguishment between two groups (see Figure 1E), demonstrated by an AUC value of 78.06% (Table 2).

_{AF}. In contrast, the value for the non-AF rhythm changed more rapidly than that of the AF rhythms, and when r = 0.9, the two groups were merged with a large proportion, resulting in a low AUC value of 88.27%. Therefore, we concluded that when parameters n and r were both small, the entropy value distributions separated from each other very obviously, and thus Entropy

_{AF}had a better capability for AF detection.

## 4. Discussion and Conclusions

_{AF}for AF identification, and to determine the effective combination for parameters r and n in order to obtain a good recognition effect.

_{AF}was dependent on the vector distances when the embedding dimension increased to m + 1 = 2, i.e., from the comparison between two vectors, ${X}_{i}^{m+1}$ and ${X}_{j}^{m+1}$. Figure 7 and Figure 8 show the variation trends of the vector similarity degree changed from 0 to 1. When the vector similarity degrees changed to the power of n, the similarity degree distribution for both AF and N rhythms also changed. When parameter n was small (n = 0.125, 0.25, and 0.5), and the smaller n was, the large similarity degrees were more concentrated and separated more obviously with a distance of 0. The variation of the similarity degrees led to a change of Entropy

_{AF}values for both the AF and N rhythms. When r remained a relatively small value (r = 0.05), the distribution of entropy value for the AF and N segments separated the most obviously when n = 0.125, and when parameter n became larger, the two distribution gradually merged with each other. The variation trend was similar to the cumulative distribution function of vector similarity degrees: the two curves for the AF and N segments separated with each other when n was small (n = 0.125), and as n increased, the length of separation from similarity degree 0 for the two curves became shorter. Except for the affection brought from parameter n, parameter r also had an impact on Entropy

_{AF}values. When n was set to a constant value (n = 0.5), the distribution of entropy values for AF and N segments also changed as r increased—from obviously separated (r = 0.05) to almost merged with each other (r = 0.6).

_{AF}values for the distribution of AF and non-AF segments more obvious, and can improve the detection capability of Entropy

_{AF}for the AF rhythm. The best combinations of the two parameters to identify the AF rhythms were as follows: r = 0.01, n = 0.0625, 0.125, 0.25, or 0.5; r = 0.05 and n = 0.0625, 0.125, or 0.25; and r = 0.10 and n = 0.0625 or 0.125.

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Conflicts of Interest

## References

- Nattel, S. New ideas about atrial fibrillation 50 years on. Nature
**2002**, 415, 219–226. [Google Scholar] [CrossRef] - Lloyd-Jones, D.M.; Wang, T.J.; Leip, E.P.; Larson, M.G.; Levy, D.; Vasan, R.S.; Agostino, R.B.D.; Massaro, J.M.; Beiser, A.; Wolf, P.A. Lifetime risk for development of atrial fibrillation: The Framingham Heart Study. Circulation
**2004**, 110, 1042–1046. [Google Scholar] [CrossRef] - Lip, G.Y.; Tse, H. Management of atrial fibrillation. Lancet
**2007**, 370, 604–618. [Google Scholar] [CrossRef] [Green Version] - Hindricks, G.; Potpara, T.; Dagres, N.; Arbelo, E.; Bax, J.J.; Blomström-Lundqvist, C.; Boriani, G.; Castella, M.; Dan, G.; Dilaveris, P.E.; et al. ESC Scientific Document Group. 2020 ESC Guidelines for the diagnosis and management of atrial fibrillation developed in collaboration with the European Association for Cardio-Thoracic Surgery (EACTS): The Task Force for the diagnosis and management of atrial fibrillation of the European Society of Cardiology (ESC) Developed with the special contribution of the European Heart Rhythm Association (EHRA) of the ESC. Eur. Heart J.
**2021**, 42, 373–498. [Google Scholar] [PubMed] - Rienstra, M.; Lubitz, S.A.; Mahida, S.; Magnani, J.W.; Fontes, J.D.; Sinner, M.F.; Van Gelder, I.C.; Ellinor, P.T.; Benjamin, E.J. Symptoms and functional status of patients with atrial fibrillation: State of the art and future research opportunities. Circulation
**2012**, 125, 2933–2943. [Google Scholar] [CrossRef] [Green Version] - Dharmaprani, D.; Dykes, L.; McGavigan, A.D.; Kuklik, P.; Pope, K.; Ganesan, A.N. Information theory and atrial fibrillation (AF): A review. Front. Physiol.
**2018**, 9, 957. [Google Scholar] [CrossRef] - Camm, A.J.; Corbucci, G.; Padeletti, L. Usefulness of continuous electrocardiographic monitoring for atrial fibrillation. Am. J. Cardiol.
**2012**, 110, 270–276. [Google Scholar] [CrossRef] - Liu, C.; Zhang, X.; Zhao, L.; Liu, F.; Chen, X.; Yao, Y.; Li, J. Signal quality assessment and lightweight QRS detection for wearable ECG SmartVest system. IEEE Internet Things J.
**2018**, 6, 1363–1374. [Google Scholar] [CrossRef] - Liu, C.; Yang, M.; Di, J.; Xing, Y.; Li, Y.; Li, J. Wearable ECG: History, Key technologies and future challenges. Chin. J. Biomed. Eng.
**2019**, 38, 641–652. [Google Scholar] - Liu, C.; Oster, J.; Reinertsen, E.; Li, Q.; Zhao, L.; Nemati, S.; Clifford, G.D. A comparison of entropy approaches for AF discrimination. Physiol. Meas.
**2018**, 39, 74002. [Google Scholar] [CrossRef] [PubMed] - Dilaveris, P.E.; Gialafos, J.E. P--wave dispersion: A novel predictor of paroxysmal atrial fibrillation. Ann. Noninvasive Electrocardiol.
**2001**, 6, 159–165. [Google Scholar] [CrossRef] - Guidera, S.A.; Steinberg, J.S. The signal-averaged P wave duration: A rapid and noninvasive marker of risk of atrial fibrillation. J. Am. Coll. Cardiol.
**1993**, 21, 1645–1651. [Google Scholar] [CrossRef] [Green Version] - Ladavich, S.; Ghoraani, B. Rate-independent detection of atrial fibrillation by statistical modeling of atrial activity. Biomed. Signal Process. Control
**2015**, 18, 274–281. [Google Scholar] [CrossRef] - Colloca, R. Implementation and Testing of Atrial Fibrillation Detectors for a Mobile Phone Application. Master’s Thesis, Politecnico Di Milano, Milan, Italy, 2013. [Google Scholar]
- Tateno, K.; Glass, L. Automatic detection of atrial fibrillation using the coefficient of variation and density histograms of RR and ΔRR intervals. Med. Biol. Eng. Comput.
**2001**, 39, 664–671. [Google Scholar] [CrossRef] [PubMed] - Park, J.; Lee, S.; Jeon, M. Atrial fibrillation detection by heart rate variability in Poincare plot. Biomed. Eng. Online
**2009**, 8, 1–12. [Google Scholar] [CrossRef] [Green Version] - Linker, D.T. Long-Term Monitoring for Detection of Atrial Fibrillation. U.S. Patent 7,630,756, 8 September 2009. [Google Scholar]
- Zhou, X.; Ding, H.; Ung, B.; Pickwell-MacPherson, E.; Zhang, Y. Automatic online detection of atrial fibrillation based on symbolic dynamics and Shannon entropy. Biomed. Eng. Online
**2014**, 13, 1–18. [Google Scholar] [CrossRef] [Green Version] - Alcaraz, R.; Rieta, J.J. A review on sample entropy applications for the non-invasive analysis of atrial fibrillation electrocardiograms. Biomed. Signal Process. Control
**2010**, 5, 1–14. [Google Scholar] [CrossRef] - Lake, D.E.; Richman, J.S.; Griffin, M.P.; Moorman, J.R. Sample entropy analysis of neonatal heart rate variability. Am. J. Physiol.-Regul. Integr. Comp. Physiol.
**2002**, 283, R789–R797. [Google Scholar] [CrossRef] [Green Version] - Lake, D.E.; Moorman, J.R. Accurate estimation of entropy in very short physiological time series: The problem of atrial fibrillation detection in implanted ventricular devices. Am. J. Physiol.-Heart Circ. Physiol.
**2011**, 300, H319–H325. [Google Scholar] [CrossRef] - Liu, C.; Li, K.; Zhao, L.; Liu, F.; Zheng, D.; Liu, C.; Liu, S. Analysis of heart rate variability using fuzzy measure entropy. Comput. Biol. Med.
**2013**, 43, 100–108. [Google Scholar] [CrossRef] - Omidvarnia, A.; Mesbah, M.; Pedersen, M.; Jackson, G. Range entropy: A bridge between signal complexity and self-similarity. Entropy
**2018**, 20, 962. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Zhao, L.; Liu, C.; Wei, S.; Shen, Q.; Zhou, F.; Li, J. A new entropy-based atrial fibrillation detection method for scanning wearable ecg recordings. Entropy
**2018**, 20, 904. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Zhao, L.; Wei, S.; Zhang, C.; Zhang, Y.; Jiang, X.; Liu, F.; Liu, C. Determination of sample entropy and fuzzy measure entropy parameters for distinguishing congestive heart failure from normal sinus rhythm subjects. Entropy
**2015**, 17, 6270–6288. [Google Scholar] [CrossRef] [Green Version] - Pincus, S.M. Assessing serial irregularity and its implications for health. Ann. N. Y. Acad. Sci.
**2001**, 954, 245–267. [Google Scholar] [CrossRef] [PubMed] - Pincus, S.M.; Huang, W. Approximate entropy: Statistical properties and applications. Commun. Stat.-Theory Methods
**1992**, 21, 3061–3077. [Google Scholar] [CrossRef] - Richman, J.S.; Moorman, J.R. Physiological time-series analysis using approximate entropy and sample entropy. Am. J. Physiol.-Heart Circ. Physiol.
**2000**, 278, H2039–H2049. [Google Scholar] [CrossRef] [Green Version] - Aktaruzzaman, M.; Sassi, R. Parametric estimation of sample entropy in heart rate variability analysis. Biomed. Signal Process. Control
**2014**, 14, 141–147. [Google Scholar] [CrossRef] - Mayer, C.C.; Bachler, M.; Hörtenhuber, M.; Stocker, C.; Holzinger, A.; Wassertheurer, S. Selection of entropy-measure parameters for knowledge discovery in heart rate variability data. BMC Bioinform.
**2014**, 15, S2. [Google Scholar] [CrossRef] [Green Version] - Yentes, J.M.; Hunt, N.; Schmid, K.K.; Kaipust, J.P.; McGrath, D.; Stergiou, N. The appropriate use of approximate entropy and sample entropy with short data sets. Ann. Biomed. Eng.
**2013**, 41, 349–365. [Google Scholar] - Chen, W.; Wang, Z.; Xie, H.; Yu, W. Characterization of surface EMG signal based on fuzzy entropy. IEEE Trans. Neural Syst. Rehabil. Eng.
**2007**, 15, 266–272. [Google Scholar] [CrossRef] - Cao, P.; Ye, B.; Yang, L.; Lu, F.; Fang, L.; Cai, G.; Su, Q.; Ning, G.; Pan, Q. Preprocessing unevenly sampled RR interval signals to enhance estimation of heart rate deceleration and acceleration capacities in discriminating chronic heart failure patients from healthy controls. Comput. Math. Methods Med.
**2020**, 2020, 9763826. [Google Scholar] [CrossRef] - Clifford, G.D.; Tarassenko, L. Quantifying errors in spectral estimates of HRV due to beat replacement and resampling. IEEE Trans. Biomed. Eng.
**2005**, 52, 630–638. [Google Scholar] [CrossRef] [Green Version] - Kantelhardt, J.W.; Bauer, A.; Schumann, A.Y.; Barthel, P.; Schneider, R.; Malik, M.; Schmidt, G. Phase-rectified signal averaging for the detection of quasi-periodicities and the prediction of cardiovascular risk. Chaos: An Interdiscip. J. Nonlinear Sci.
**2007**, 17, 015112. [Google Scholar] [CrossRef]

**Figure 1.**Histogram of Entropy

_{AF}values under different parameters: (

**A**) n = 0.125, r = 0.05; (

**B**) n = 0.5, r = 0.05; (

**C**) n = 1, r = 0.05; (

**D**) n = 2, r = 0.05; and (

**E**) n = 4, r = 0.05. The x-axis presents the Entropy

_{AF}values and the y-axis presents the number of 30-beat segments.

**Figure 2.**Histogram of Entropy

_{AF}values under different parameters: (

**A**) n = 0.125, r = 0.05; (

**B**) n = 0.125, r = 0.1; (

**C**) n = 0.125, r = 0.2; (

**D**) n = 0.125, r = 0.5; and (

**E**) n = 0.125, r = 0.9. The x-axis presents the Entropy

_{AF}values and the y-axis presents the number of 30-beat segments.

**Figure 4.**Demonstration of $d{X}_{i,j}^{m+1}=0$ when two elements are on the lines of (

**A**) y = x + a or (

**B**) y = −x + a.

**Figure 5.**Demonstration of $d{X}_{i,j}^{m+1}=1$ when two elements are on the lines of (

**A**) y = a or (

**B**) x = a.

**Figure 7.**Vector similarity degrees histogram of the AF rhythm. (

**A**) n = 0.125; (

**B**) n = 0.25; (

**C**) n = 0.5; (

**D**) n = 1; (

**E**) n = 2 and (

**F**) n =4.

**Figure 8.**Vector similarity degrees histogram of the N rhythm. (

**A**) n = 0.125; (

**B**) n = 0.25; (

**C**) n = 0.5; (

**D**) n = 1; (

**E**) n = 2 and (

**F**) n =4.

**Figure 9.**Cumulative distribution function (CDF) for vector similarity degrees. (

**A**) n = 0.125; (

**B**) n = 0.25; (

**C**) n = 0.5; (

**D**) n = 1; (

**E**) n = 2 and (

**F**) n =4.

**Table 1.**MIT-BIH AF database profiles for different rhythm types. For each rhythm type, the numbers and the corresponding percentages (%) are given. (# means the number of).

Variable | AF Rhythm | Non-AF Rhythm | |||
---|---|---|---|---|---|

N | AFL | J | Total | ||

# rhythm episodes | 299 (48.0%) | 292 (46.9%) | 14 (2.2%) | 18 (2.9%) | 324 (52.0%) |

Total time length (h) | 93.5 (37.5%) | 149.1 (59.8%) | 1.4 (0.6%) | 5.2 (2.1%) | 155.7 (62.5%) |

# RR intervals | 521,415 (42.6%) | 663,202 (54.2%) | 11,710 (1.0%) | 26,818 (2.2%) | 701,730 (57.4%) |

# RR segments | 17,247 (42.6%) | 21,968 (54.3%) | 383 (0.9%) | 886 (2.2%) | 23,237 (57.4%) |

**Table 2.**AUC results for AF detection under different parameter combinations (beat window = 30). The values in bold indicate the highest accuracy.

n | 0.0625 | 0.125 | 0.25 | 0.5 | 1 | 2 | 4 | 8 | 16 | |
---|---|---|---|---|---|---|---|---|---|---|

r | ||||||||||

0.01 | 98.15% | 98.15% | 98.15% | 98.15% | 97.87% | 88.78% | 79.81% | 76.37% | 71.06% | |

0.05 | 98.15% | 98.15% | 98.15% | 98.08% | 94.11% | 82.96% | 78.06% | 73.30% | 67.94% | |

0.10 | 98.15% | 98.15% | 98.12% | 97.28% | 90.38% | 80.86% | 76.36% | 71.39% | 66.30% | |

0.15 | 98.13% | 98.10% | 97.91% | 95.89% | 87.72% | 79.42% | 74.99% | 70.05% | 65.33% | |

0.20 | 98.06% | 97.95% | 97.40% | 94.36% | 85.72% | 78.27% | 73.91% | 69.07% | 64.74% | |

0.25 | 97.85% | 97.60% | 96.64% | 92.77% | 84.13% | 77.38% | 73.11% | 68.43% | 64.42% | |

0.30 | 97.47% | 97.07% | 95.74% | 91.22% | 82.84% | 76.71% | 72.52% | 68.03% | 64.31% | |

0.35 | 96.96% | 96.41% | 94.76% | 89.85% | 81.83% | 76.21% | 72.13% | 67.81% | 64.39% | |

0.40 | 96.35% | 95.66% | 93.66% | 88.66% | 81.06% | 75.86% | 71.88% | 67.76% | 64.57% | |

0.45 | 95.68% | 94.83% | 92.58% | 87.59% | 80.45% | 75.60% | 71.73% | 67.80% | 64.81% | |

0.50 | 94.92% | 93.93% | 91.59% | 86.63% | 79.96% | 75.41% | 71.68% | 67.89% | 65.10% | |

0.55 | 94.11% | 93.05% | 90.69% | 85.79% | 79.59% | 75.29% | 71.66% | 68.05% | 65.40% | |

0.60 | 93.31% | 92.23% | 89.85% | 85.04% | 79.26% | 75.20% | 71.68% | 68.24% | 65.73% | |

0.65 | 92.56% | 91.46% | 89.07% | 84.37% | 79.01% | 75.14% | 71.74% | 68.45% | 66.06% | |

0.70 | 91.86% | 90.77% | 88.34% | 83.80% | 78.79% | 75.10% | 71.82% | 68.65% | 66.38% | |

0.75 | 91.21% | 90.10% | 87.65% | 83.31% | 78.60% | 75.08% | 71.91% | 68.86% | 66.69% | |

0.80 | 90.59% | 89.45% | 87.03% | 82.87% | 78.44% | 75.09% | 71.99% | 69.07% | 66.99% | |

0.85 | 90.02% | 88.84% | 86.43% | 82.50% | 78.32% | 75.09% | 72.09% | 69.28% | 67.28% | |

0.90 | 89.45% | 88.27% | 85.90% | 82.14% | 78.19% | 75.10% | 72.20% | 69.48% | 67.57% | |

0.95 | 88.90% | 87.92% | 85.42% | 81.82% | 78.11% | 75.11% | 72.30% | 69.69% | 67.84% | |

0.99 | 88.49% | 87.31% | 85.06% | 81.62% | 78.03% | 75.14% | 72.39% | 69.83% | 68.05% |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Zhao, L.; Li, J.; Wan, X.; Wei, S.; Liu, C.
Determination of Parameters for an Entropy-Based Atrial Fibrillation Detector. *Entropy* **2021**, *23*, 1199.
https://doi.org/10.3390/e23091199

**AMA Style**

Zhao L, Li J, Wan X, Wei S, Liu C.
Determination of Parameters for an Entropy-Based Atrial Fibrillation Detector. *Entropy*. 2021; 23(9):1199.
https://doi.org/10.3390/e23091199

**Chicago/Turabian Style**

Zhao, Lina, Jianqing Li, Xiangkui Wan, Shoushui Wei, and Chengyu Liu.
2021. "Determination of Parameters for an Entropy-Based Atrial Fibrillation Detector" *Entropy* 23, no. 9: 1199.
https://doi.org/10.3390/e23091199