Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Machine learning detection of Atrial Fibrillation using wearable technology

  • Mark Lown ,

    Roles Conceptualization, Data curation, Formal analysis, Funding acquisition, Investigation, Methodology, Project administration, Resources, Software, Validation, Visualization, Writing – original draft, Writing – review & editing

    m.lown@soton.ac.uk

    Affiliation Primary Care & Population Sciences, Faculty of Medicine, University of Southampton, Southampton, England

  • Michael Brown,

    Roles Conceptualization, Formal analysis, Methodology, Software, Validation, Writing – original draft, Writing – review & editing

    Affiliation Leonardo MW Ltd, Southampton, England

  • Chloë Brown,

    Roles Formal analysis, Methodology, Software, Writing – review & editing

    Affiliation Primary Care & Population Sciences, Faculty of Medicine, University of Southampton, Southampton, England

  • Arthur M. Yue,

    Roles Methodology, Writing – review & editing

    Affiliation Cardiology and Electrophysiology, Southampton General Hospital, Southampton, England

  • Benoy N. Shah,

    Roles Methodology, Writing – review & editing

    Affiliation Cardiology and Electrophysiology, Southampton General Hospital, Southampton, England

  • Simon J. Corbett,

    Roles Methodology, Writing – review & editing

    Affiliation Cardiology and Electrophysiology, Southampton General Hospital, Southampton, England

  • George Lewith †,

    † Deceased.

    Roles Conceptualization, Funding acquisition, Methodology, Supervision

    Affiliation Cardiology and Electrophysiology, Southampton General Hospital, Southampton, England

  • Beth Stuart,

    Roles Data curation, Formal analysis, Methodology

    Affiliation Primary Care & Population Sciences, Faculty of Medicine, University of Southampton, Southampton, England

  • Michael Moore,

    Roles Conceptualization, Funding acquisition, Methodology, Supervision, Writing – review & editing

    Affiliation Primary Care & Population Sciences, Faculty of Medicine, University of Southampton, Southampton, England

  • Paul Little

    Roles Conceptualization, Formal analysis, Funding acquisition, Methodology, Supervision, Writing – review & editing

    Affiliation Primary Care & Population Sciences, Faculty of Medicine, University of Southampton, Southampton, England

Abstract

Background

Atrial Fibrillation is the most common arrhythmia worldwide with a global age adjusted prevalence of 0.5% in 2010. Anticoagulation treatment using warfarin or direct oral anticoagulants is effective in reducing the risk of AF-related stroke by approximately two-thirds and can provide a 10% reduction in overall mortality. There has been increased interest in detecting AF due to its increased incidence and the possibility to prevent AF-related strokes. Inexpensive consumer devices which measure the ECG may have the potential to accurately detect AF but do not generally incorporate diagnostic algorithms. Machine learning algorithms have the potential to improve patient outcomes particularly where diagnoses are made from large volumes or complex patterns of data such as in AF.

Methods

We designed a novel AF detection algorithm using a de-correlated Lorenz plot of 60 consecutive RR intervals. In order to reduce the volume of data, the resulting images were compressed using a wavelet transformation (JPEG200 algorithm) and the compressed images were used as input data to a Support Vector Machine (SVM) classifier. We used the Massachusetts Institute of Technology (MIT)—Beth Israel Hospital (BIH) Atrial Fibrillation database and the MIT-BIH Arrhythmia database as training data and verified the algorithm performance using RR intervals collected using an inexpensive consumer heart rate monitor device (Polar-H7) in a case-control study.

Results

The SVM algorithm yielded excellent discrimination in the training data with a sensitivity of 99.2% and a specificity of 99.5% for AF. In the validation data, the SVM algorithm correctly identified AF in 79/79 cases; sensitivity 100% (95% CI 95.4%-100%) and non-AF in 328/336 cases; specificity 97.6% (95% CI 95.4%-99.0%).

Conclusions

An inexpensive wearable heart rate monitor and machine learning algorithm can be used to detect AF with very high accuracy and has the capability to transmit ECG data which could be used to confirm AF. It could potentially be used for intermittent screening or continuously for prolonged periods to detect paroxysmal AF. Further work could lead to cost-effective and accurate estimation of AF burden and improved risk stratification in AF.

Introduction

Atrial Fibrillation is the most common arrhythmia worldwide with a global age adjusted prevalence of 0.5% in 2010.[1] Numerous studies have reported a growing epidemic of AF with an expected doubling of its prevalence by 2030.[1]AF is linked with up to 1/3 of all strokes and as a significant proportion is asymptomatic it can often go undiagnosed.[2] There has been increased interest in detecting AF due to its increased incidence and the possibility to prevent AF-related strokes.[3] Anticoagulation treatment using warfarin or direct oral anticoagulants is effective in reducing the risk of AF-related stroke by approximately two-thirds and can provide a 10% reduction in overall mortality.[4] Screening for AF has been the subject of much recent debate by expert committees.[3]

There has been recent interest in the use of consumer devices for the detection of arrhythmias including AF.[5,6] Wrist-worn heart-rate sensors that measure heart rate using Light Emitting Diodes (LEDs) have become increasingly popular but their accuracy has been questioned and some manufacturers advise the heart rate measurement should be considered an estimate and suggest using a chest heart rate sensor for increased accuracy.[7] LED based wrist sensors have been shown to underestimate heart-rate during AF and thus may be less accurate for detecting AF.[8] Because ECG confirmation is mandated by guidelines for the diagnosis of AF, devices which sense an ECG signal may have the advantage of providing a verifiable ECG trace and would therefore be a preferred screening tool.[9] Although consumer chest heart rate sensors may be less comfortable than wrist based sensors, they are inherently designed to be compact, lightweight, unobtrusive, have long battery lives and should be accurate when used in sub-optimal settings such as during exercise. Consumer devices are now available which transmit ECG data in addition to heart rate enabling accurate AF detection by a cardiologist and automated algorithms.[10]

Consumer devices do not generally have algorithms incorporated for the detection of AF. In terms of diagnostic algorithms, machine learning has the potential to improve patient outcomes particularly where diagnoses are made from large volumes or complex patterns of data. Recently, machine learning algorithms have been developed to detect diabetic retinopathy with high accuracy[11] and to detect breast cancer metastases with a higher accuracy than pathologists.[12] In this research we aimed to investigate if an inexpensive consumer chest heart rate monitor device could be used along with a highly discriminative machine learning algorithm to accurately detect AF.

Methods

The study complies with the declaration of Helsinki, and the protocol was approved by the London—City & East Research Ethics Committee in June 2016 (ref 16/LO/1173). Informed consent was obtained from all participants (trial registration ISRCTN: 17495003). We developed the algorithm using an online database of RR intervals obtained from Holter recordings containing segments of sinus rhythm, AF and other arrhythmias.[13] We used 60 consecutive intervals to construct a Lorenz plot (a correlated scatter-plot of consecutive RR interval changes vs the previous change (ΔRR[k], ΔRR[k-1]) depicting heart rate variability). The patterns of data in the Lorenz plots for regularly irregular intervals such as bigeminy can distinguished from the more random pattern of AF.[14] We de-correlated the Lorenz plot using the following direct transformation derived from first principles (see S1 Appendix): (1)

Where X is the difference between the two consecutive, discrete RR intervals and Y is the previous value of X ie. X = RR(k)–RR(k-1) and Y = X(k-1). We then compressed the de-correlated Lorenz plot using a wavelet-transformation (as used in the JPEG 2000 image compression algorithm[15]) to reduce the volume of data (to an 8x8 pixel image) presented to the machine learning algorithm (a Gaussian Support Vector Machine (SVM)) and hence the volume of training data required. Overtraining was avoided using crossfold-validation through the dataset.[16] (K-fold cross validation partitions data into k randomly chosen subsets (or folds) of roughly equal size. One subset is used to validate the model trained using the remaining (k-1) subsets. This process is repeated k times such that each subset is used exactly once for validation. We used 5-fold cross validation and the data was split randomly across records in the entire training dataset). This process is depicted in Fig 1 which depicts the original Lorenz plots, de-correlated Lorenz plots and subsequent compressed images used to train the SVM for 60 interval segments of normal sinus rhythm, bigeminy and AF. 60 consecutive RR intervals were used for training and in the validation data.

thumbnail
Fig 1. Correlated de-correlated Lorenz plots, compressed images and corresponding ECG data used to train the SVM for 60 interval segments of [A] normal sinus rhythm, [B] bigeminy and [C] AF.

https://doi.org/10.1371/journal.pone.0227401.g001

We trained the SVM using the Massachusetts Institute of Technology (MIT)—Beth Israel Hospital (BIH) Atrial Fibrillation database (comprising approximately 250 hours from 25 subjects; approximately 95 hours of AF (319 episodes), 2 hours of atrial flutter (40 episodes) and 163 hours of other rhythms) and the MIT-BIH Arrhythmia database (comprising approximately 24 hours of data from 47 subjects including complex ventricular, junctional, and supraventricular arrhythmias). We used the RR intervals and rhythms annotated in the database and did not employ a separate QRS detection algorithm. The MITBIH-AF database yielded 7,744 consecutive 60 beat sequences of AF, and 10,467 non-AF; the MIT-BIH Arrhythmia yielded 134 AF and 1404 non-AF consecutive 60-beat sequences.

We validated the algorithm using data from a case-control study of 415 participants aged > 65yrs (79 with AF at the study visit and 336 without) attending 3 general practice surgeries in Hampshire, UK for a single screening visit.[17] Following informed consent, 60 consecutive R-R intervals were obtained from participants at rest using the Polar H7 (PH7) heart rate monitor (via Bluetooth) and an iPad by study nurses. The participants each had a 12-Lead ECG, which were interpreted independently by 2 cardiologists, with a 3rd cardiologist adjudicating disagreements. The PH7 is an inexpensive device (cost price £26) and has been shown to measure RR intervals accurately.[18]

Results

Training data

In the training data, the SVM algorithm yielded excellent discrimination with a sensitivity of 99.2% and a specificity of 99.5% for AF.

Validation / Trial data.

The SVM algorithm correctly identified AF in 79/79 cases; sensitivity 100% (95% CI 95.4%-100%) and non-AF in 328/336 cases; specificity 97.6% (95% CI 95.4%-99.0%). Several control cases had non-AF arrhythmias including heart block, bigeminy and sinus arrhythmia[19]. Fig 2 shows Lorenz plots (standard / correlated) for the incorrectly classified (false positive) cases.

thumbnail
Fig 2. Correlated Lorenz plots for the false positive cases.

https://doi.org/10.1371/journal.pone.0227401.g002

Discussion of results

The SVM algorithm demonstrated excellent discrimination with sensitivity and specificity both exceeding 99% for the training data set. This compares favourably with other algorithms results using the same databases in the literature.[2022] Furthermore, we have validated the algorithm performance with clinical data obtained using an in expensive consumer device and achieved excellent discrimination with sensitivity and specificity both within 2% of the training data set results. High performing algorithms such as the SVM could greatly reduce clinical workload in terms of clinician confirmation of AF in positive cases. Visual inspection of the Lorenz plots of the false positive cases indicates several cases with clustering of RR intervals (case 021 and 118) which is not suggestive of atrial fibrillation and thus algorithm modifications or further training could possibly lead to improvements in performance.

The accuracy of the Polar-H7 and SVM algorithm also compares favourably with the accuracy of commercial devices designed and approved to detect AF.[23,24] The accuracy of the consumer device and algorithm was comparable to a cardiologist’s interpretation of single-lead ECGs.[25] Although it is not currently implemented commercially, a variant of the Polar-H7 device can transmit single lead ECG data which could be used to confirm the AF diagnosis. A newly available similar device that also provides a rhythm strip has been used clinically to detect AF and the ECG strip was sufficient for reliable confirmation of AF compared with a Holter monitor.[10] Smartphones are becoming more widely used among the elderly and in developing countries and in conjunction with inexpensive wearable technology, present an opportunity for cost-effective screening for AF. If these products are to be used in future for the diagnosis of AF, they would need to be registered as medical devices with either FDA approval (US) or a CE mark (EU).

Current guidelines make identical recommendations for anticoagulation regardless of AF pattern or burden (defined as the amount of time spent in AF). Reviews of recent evidence however suggests that higher AF burden is associated with higher risk of stroke[26]. Developments in monitoring technologies and algorithms will likely change the landscape of long-term AF monitoring and could allow better definition of the significance of changes in AF burden over time and to improved risk stratification and potentially improved patient outcomes. Inexpensive devices such as the Polar-H7 and Suunto Movesense[10] together with further algorithm development and implementation could lead to cost-effective methods for prolonged and continuous monitoring for AF detection. In addition, they could also potentially be used where clinically appropriate for the investigation of palpitations and syncope and the detection of other arrhythmias. The SVMs utility could potentially be used to classify patterns generated by other arrhythmias from the Lorenz plots which would potentially be an advantage over methods employing statistical analysis. This should be considered for future research.

Conclusions

An inexpensive wearable heart rate monitor and machine learning algorithm can be used to detect AF with very high accuracy and has the capability to transmit ECG data which could be used to confirm AF. It could potentially be used for intermittent screening or continuously for prolonged periods to detect paroxysmal AF. Further work could lead to cost-effective and accurate estimation of AF burden and improved risk stratification in AF.

Acknowledgments

We thank the CRN Wessex team and in particular Kerry Gunner, Clare Grocott, Julie Kennedy, Vivian Sparshott and the trial manager Kate Martinson.

The views expressed are those of the authors(s) and not necessarily those of the NIHR, the NHS or the department of Health or Leonardo MW Ltd.

References

  1. 1. Patel NJ, Atti V, Mitrani RD, Viles-Gonzalez JF, Goldberger JJ. Global rising trends of atrial fibrillation: a major public health concern. Heart. 2018 Dec;104(24):1989–1990. pmid:29907645
  2. 2. Reiffel JA, Atrial fibrillation and stroke: epidemiology. Am J Med. 2014 Apr;127(4):e15–6.
  3. 3. Lown M, Moran P. Should we screen for atrial fibrillation? BMJ. 2019 Feb 13;364:l43. pmid:30760476
  4. 4. Granger CB, Armaganijan LV. Newer oral anticoagulants should be used as first-line agents to prevent thromboembolism in patients with atrial fibrillation and risk factors for stroke or thromboembolism. Circulation. 2012 Jan 3;125(1):159–64; pmid:22215890
  5. 5. Turakhia MP, Desai M, Hedlin H, Rajmane A, Talati N, Ferris T et al. Rationale and design of a large-scale, app-based study to identify cardiac arrhythmias using a smartwatch: The Apple Heart Study. Am Heart J. 2019 Jan;207:66–75. pmid:30392584
  6. 6. Bonomi AG, Schipper F, Eerikäinen LM, Margarito J, van Dinther R, Muesch G, et al. Atrial Fibrillation Detection Using a Novel Cardiac Ambulatory Monitor Based on Photo-Plethysmography at the Wrist. J Am Heart Assoc. 2018 Aug 7;7(15):
  7. 7. https://www.suunto.com/en-gb/Content-pages/what-should-you-know-about-wrist-heart-rate2/. Accessed 01/03/2019
  8. 8. Koshy AN, Sajeev JK, Nerlekar N, Brown AJ, Rajakariar K, Zureik M, et al. Smart watches for heart rate assessment in atrial arrhythmias. Int J Cardiol. 2018 Sep 1;266:124–127. pmid:29887428
  9. 9. Freedman B, Camm J, Calkins H, Healey JS, Rosenqvist M, Wang J, et al.; AF-Screen Collaborators. Screening for Atrial Fibrillation: A Report of the AF-SCREEN International Collaboration. Circulation. 2017 May 9;135(19):1851–1867. pmid:28483832
  10. 10. Hartikainen S, Lipponen JA, Hiltunen P, Rissanen TT, Kolk I, Tarvainen MP, et al. Effectiveness of the Chest Strap Electrocardiogram to Detect Atrial Fibrillation. Am J Cardiol. 2019 Feb 23.
  11. 11. Gulshan V, Peng L, Coram M, Stumpe MC, Wu D, Narayanaswamy A, et al. Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy in Retinal Fundus Photographs. JAMA. 2016 Dec 13;316(22):2402–2410. pmid:27898976
  12. 12. Ehteshami Bejnordi B, Veta M, Johannes van Diest P, van Ginneken B, Karssemeijer N, Litjens G, et al.; the CAMELYON16 Consortium. Diagnostic Assessment of Deep Learning Algorithms for Detection of Lymph Node Metastases in Women With Breast Cancer. JAMA. 2017 Dec 12;318(22):2199–2210. pmid:29234806
  13. 13. Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 2000;101:e215–e220. pmid:10851218
  14. 14. Deshmukh A, Brown ML, Higgins E, Schousek B, Abeyratne A, Rovaris G, et al. Performance of Atrial Fibrillation Detection in a New Single-Chamber ICD. Pacing Clin Electrophysiol. 2016;39:1031–1037. pmid:27433785
  15. 15. Zeng W, Daly S. An overview of the visual optimization tools in JPEG 2000. Signal Process: Image Comm. 2002;17:85–104.
  16. 16. Ji-Hyun Kim. 2009. Estimating classification error rate: repeated cross-validation, repeated hold-out and bootstrap. Computational Statistics & Data Analysis, 53(11):3735–3745.
  17. 17. Lown M, Yue A, Lewith G, Little P, Moore M. Screening for Atrial Fibrillation using Economical and accurate TechnologY (SAFETY)-a pilot study. BMJ Open. 2017;13;7 1:e013535. pmid:28087552
  18. 18. Giles D, Draper N, Neil W. Validity of the Polar V800 heart rate monitor to measure RR intervals at rest. Eur J Appl Physiol 2016;116:563–71. pmid:26708360
  19. 19. Lown M, Yue AM, Shah BN, Corbett SJ, Lewith G, Stuart B, et al. Screening for Atrial Fibrillation Using Economical and Accurate Technology (From the SAFETY Study). Am J Cardiol. 2018 Oct 15;122(8):1339–1344. pmid:30131106
  20. 20. Zhou X, Ding H, Wu W, Zhang Y. A Real-Time Atrial Fibrillation Detection Algorithm Based on the Instantaneous State of Heart Rate. PLoS One. 2015 Sep 16;10(9):e0136544. pmid:26376341
  21. 21. Andersen RS, Poulsen ES, Puthusserypady S. A novel approach for automatic detection of Atrial Fibrillation based on Inter Beat Intervals and Support Vector Machine. Conf Proc IEEE Eng Med Biol Soc. 2017 Jul;2017:2039–2042. pmid:29060297
  22. 22. Gilani M, Eklund JM, Makrehchi M. Automated detection of atrial fibrillation episode using novel heart rate variability features. Conf Proc IEEE Eng Med Biol Soc. 2016 Aug;2016:3461–3464. pmid:28269045
  23. 23. Desteghe L, Raymaekers Z, Lutin M, Vijgen J, Dilling-Boer D, Koopman P, et al. Performance of handheld electrocardiogram devices to detect atrial fibrillation in a cardiology and geriatric ward setting. Europace. 2017 Jan;19(1):29–39. pmid:26893496
  24. 24. Lowres N, Neubeck L, Salkeld G, Krass I, McLachlan AJ, Redfern J, et al. Feasibility and cost-effectiveness of stroke prevention through community screening for atrial fibrillation using iPhone ECG in pharmacies. The SEARCH-AF study. Thromb Haemost. 2014;111:1167–1176. pmid:24687081
  25. 25. Kearley K, Selwood M, Van den Bruel A, Thompson M, Mant D, Hobbs FR, et al. Triage tests for identifying atrial fibrillation in primary care: a diagnostic accuracy study comparing single-lead ECG and modified BP monitors. BMJ Open. 2014;45:e004565.
  26. 26. Chen LY, Chung MK, Allen LA, Ezekowitz M, Furie KL, McCabe P, et al.; American Heart Association Council on Clinical Cardiology; Council on Cardiovascular and Stroke Nursing; Council on Quality of Care and Outcomes Research; and Stroke Council. Atrial Fibrillation Burden: Moving Beyond Atrial Fibrillation as a Binary Entity: A Scientific Statement From the American Heart Association. Circulation. 2018 May 15;137(20):e623–e644. pmid:29661944