Robust Heartbeat Classification for Wearable Single-Lead ECG via Extreme Gradient Boosting
Abstract
:1. Introduction
- We proposed three novel morphological features, which form an effective morphological feature set with two well-used morphological features. Further, we combined a morphological feature set and wavelet coefficient characteristics as the handcraft features of XGBoost to achieve the best performance on both databases;
- We built a dedicated ECG database to evaluate the performance of the proposed heartbeat classification method, as well as other state-of-the-art methods, especially for the accuracy analysis of these methods on wearable single-lead ECG signals under an everyday ECG monitoring scenario.
2. Related Work
2.1. Arrhythmia Classification Methods
2.2. Database for Evaluating Classification Methods
- The MIT-BIH Atrial Fibrillation database (AFDB) [21] includes 25 two-channel ECG records of subjects with atrial fibrillation. Each ECG record (one per patient) lasts 10 h and the sampling frequency is 250 samples per second;
- The St. Petersburg Institute of Cardiological Technics (INCART) [21] contains 75 half-hour ECG recordings, extracted from 32 Holter recordings (one per patient). The sample rate for the 12-lead ECGs is 257 samples per second;
- The AHA database [22] can be obtained after paying a fee on the emergency care Research Institute website. This database contains 155 recordings covering 8 types of arrhythmias. Each original ECG record (one per patient) lasts 3 h in total and was divided in periods of at least half an hour. Twelve lead ECGs were collected with a sampling frequency of 250 samples per second and 12 bits of precision;
- The supraventricular arrhythmia database (SUPRA) [21] consists of 78 half-hour ECG recordings obtained from 78 patients who experienced supraventricular arrhythmia. The information was digitized in twelve ECG channels with 125 samples per second and 12 bits of precision;
- The PHYSIOBC [24] is a new database built in Mexico. This database contains 182 ECG records of 91 patients, ranging in age from 18 to 70.
3. Materials and Methods
3.1. Signal Preprocessing
Algorithm 1 The proposed ECG preprocessing algorithm: Primary Denoising |
Symbol setting: |
: the sample rate of ECG signals |
: raw ECG signals |
: filtered ECG signals |
: the parameter of the median filter |
: the lower/upper cut-off frequency and order of the band-pass FIR filter |
: the parameter of the Kaiser window |
: mean function |
: rounding function |
Process: |
A. Remove the direct current (DC) component and baseline drift in ECG signals |
Step 1: DC component removing: |
Step 2: Preliminary removal of the baseline wandering: |
if is an odd number, |
; |
else |
; |
end |
Perform points median filtering on to obtain ; |
B. Filter ECG signals: |
Step 3: Construct the FIR filter according to , and ; |
Step 4: Calculate the Kaiser window according to and ; |
Step 5: Apply the windowed FIR filter to process and obtain ; |
C. Further removal of the baseline drift |
Step 6: Perform points median filtering on to obtain . |
3.2. Feature Extraction
3.3. XGBoost Classifier
3.4. Evaluation Metrics
3.5. Study Population
3.5.1. MITDB
3.5.2. CarePatch™ ECG Patch Database
4. Results
4.1. Experimental Settings
4.2. Experimental Results
5. Discussion
5.1. Pros and Cons of the XGBoost Method
5.2. The Wearable Single-Lead ECG Database
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A
References
- Xia, Y.; Zhang, H.; Xu, L.; Gao, Z.; Zhang, H.; Liu, H.; Li, S. An Automatic Cardiac Arrhythmia Classification System with Wearable Electrocardiogram. IEEE Access 2018, 6, 16529–16538. [Google Scholar] [CrossRef]
- Hannun, A.Y.; Rajpurkar, P.; Haghpanahi, M.; Tison, G.H.; Bourn, C.; Turakhia, M.P.; Ng, A.Y. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat. Med. 2019, 25, 65–69. [Google Scholar] [CrossRef]
- Halcox, J.P.; Wareham, K.; Cardew, A.; Gilmore, M.; Barry, J.P.; Phillips, C.; Gravenor, M.B. Assessment of Remote Heart Rhythm Sampling Using the AliveCor Heart Monitor to Screen for Atrial Fibrillation: The REHEARSE-AF study. Circulation 2017, 136, 1784–1794. [Google Scholar] [CrossRef] [PubMed]
- Drexler, M.; Elsner, C.; Gabelmann, V.; Gori, T.; Münzel, T. Apple Watch detecting coronary ischaemia during chest pain episodes or an apple a day may keep myocardial infarction away. Eur. Heart J. 2020, 41, 2224. [Google Scholar] [CrossRef]
- Barrett, P.M.; Komatireddy, R.; Haaser, S.; Topol, S.; Sheard, J.; Encinas, J.; Fought, A.J.; Topol, E. Comparison of 24-hour Holter Monitoring with 14-day Novel Adhesive Patch Electrocardiographic Monitoring. Am. J. Med. 2014, 127, 95.e11–95.e17. [Google Scholar] [CrossRef] [Green Version]
- Clifford, G.D.; Liu, C.; Moody, B.; Lehman, L.H.; Silva, I.; Li, Q.; Johnson, A.E.; Mark, R.G. AF classification from a short single lead ECG recording: The PhysioNet/Computing in Cardiology Challenge 2017. In Proceedings of the 2017 Computing in Cardiology (CinC), Rennes, France, 24–27 September 2017; pp. 1–4. [Google Scholar] [CrossRef]
- Luz, E.; Schwartz, W.R.; Chavez, G.C.; Menotti, D. ECG-based heartbeat classification for arrhythmia detection: A survey. Comput. Methods Programs Biomed. 2016, 127, 144–164. [Google Scholar] [CrossRef] [PubMed]
- Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–16 August 2016; pp. 785–794. [Google Scholar] [CrossRef] [Green Version]
- Association for the Advancement of Medical Instrumentation. Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithms; ANSI/AAMI EC57; Association for the Advancement of Medical Instrumentation: Arlington, VA, USA, 2012. [Google Scholar]
- Moody, G.; Mark, R. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng. Med. Boil. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef] [PubMed]
- Jekova, I.; Bortolan, G.; Christov, I. Assessment and comparison of different methods for heartbeat classification. Med. Eng. Phys. 2008, 30, 248–257. [Google Scholar] [CrossRef]
- Özbay, Y.; Ceylan, R.; Karlik, B. A fuzzy clustering neural network architecture for classification of ECG arrhythmias. Comput. Biol. Med. 2006, 36, 376–388. [Google Scholar] [CrossRef] [PubMed]
- Barro, S.; Delgado, M.F.; Sobrino, X.A.V.; Regueiro, C.V.; Sanchez, E. Classifying multichannel ECG patterns with an adaptive neural network. IEEE Eng. Med. Boil. Mag. 1998, 17, 45–55. [Google Scholar] [CrossRef]
- Mohanty, M.; Sahoo, S.; Biswal, P.; Sabut, S. Efficient classification of ventricular arrhythmias using feature selection and C4.5 classifier. Biomed. Signal. Process. Control. 2018, 44, 200–208. [Google Scholar] [CrossRef]
- Marinho, L.B.; Nascimento, N.D.M.; Souza, J.W.M.; Gurgel, M.V.; Filho, P.P.R.; de Albuquerque, V.H.C. A novel electrocardiogram feature extraction approach for cardiac arrhythmia classification. Futur. Gener. Comput. Syst. 2019, 97, 564–577. [Google Scholar] [CrossRef]
- Mondéjar-Guerra, V.; Novo, J.; Rouco, J.; Penedo, M.; Ortega, M. Heartbeat classification fusing temporal and morphological information of ECGs via ensemble of classifiers. Biomed. Signal. Process. Control. 2019, 47, 41–48. [Google Scholar] [CrossRef]
- Zhai, X.; Tin, C. Automated ECG Classification Using Dual Heartbeat Coupling Based on Convolutional Neural Network. IEEE Access 2018, 6, 27465–27472. [Google Scholar] [CrossRef]
- Golrizkhatami, Z.; Acan, A. ECG classification using three-level fusion of different feature descriptors. Expert Syst. Appl. 2018, 114, 54–64. [Google Scholar] [CrossRef]
- Romdhane, T.F.; Alhichri, H.; Ouni, R.; Atri, M. Electrocardiogram heartbeat classification based on a deep convolutional neural network and focal loss. Comput. Biol. Med. 2020, 123, 103866. [Google Scholar] [CrossRef]
- Li, Z.; Zhou, D.; Wan, L.; Li, J.; Mou, W. Heartbeat classification using deep residual convolutional neural network from 2-lead electrocardiogram. J. Electrocardiol. 2020, 58, 105–112. [Google Scholar] [CrossRef]
- Goldberger, A.L.; Amaral, L.A.N.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.-K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, e215–e220. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hermes, R.E.; Geselowitz, D.B.; Oliver, G.C. Development, distribution, and use of the American Heart Association data-base for ventricular arrhythmia detector evaluation. In Proceedings of the 1980 Computers in Cardiology, Williamsburg, VA, USA, 22–24 October 1980; pp. 263–266. [Google Scholar]
- Bousseljot, R.; Kreiseler, D.; Schnabel, A. Nutzung der EKG-Signaldatenbank CARDIODAT der PTB über das Internet. Biomed. Tech. Eng. 2009, 40, 317–318. [Google Scholar] [CrossRef]
- Avitia, R.L.; Avena, G.; Flores, N.; Reyna, M.A.; Nava, M.L. Physiological Data of Baja California: PhysioBC, Electrocardiographic Results 1. Rev. Mex. Ing. Bioméd. 2017, 38, 372–381. [Google Scholar] [CrossRef]
- Shen, Q.; Gao, H.; Li, Y.; Sun, Q.; Chen, M.; Li, J.; Liu, C. An Open-Access Arrhythmia Database of Wearable Electrocardiogram. J. Med. Biol. Eng. 2020, 40, 564–574. [Google Scholar] [CrossRef]
- Chen, M.; Zhong, Y.; Zhu, H.; Pan, Y. Kalman filter based electromyographic signal suppression of real-time ECG signal. In Proceedings of the 2018 Computing in Cardiology Conference (CinC), Maastricht, The Netherlands, 23–26 September 2018; pp. 1–4. [Google Scholar] [CrossRef]
- Zidelmal, Z.; Amirou, A.; Adnane, M.; Belouchrani, A. QRS detection based on wavelet coefficients. Comput. Methods Programs Biomed. 2012, 107, 490–496. [Google Scholar] [CrossRef] [PubMed]
- Sannino, G.; De Pietro, G. A deep learning approach for ECG-based heartbeat classification for arrhythmia detection. Futur. Gener. Comput. Syst. 2018, 86, 446–455. [Google Scholar] [CrossRef]
- Ye, C.; Kumar, B.V.K.V.; Coimbra, M. Heartbeat Classification Using Morphological and Dynamic Features of ECG Signals. IEEE Trans. Biomed. Eng. 2012, 59, 2930–2941. [Google Scholar] [CrossRef] [PubMed]
- Liu, S.; Lu, J.; Hao, L.; Hu, G. Detection of QRS complex using mathematical morphology and wavelet transform. J. Tsinghua Univ. Sci. Technol. 2004, 44, 852–855. [Google Scholar] [CrossRef]
- De Chazal, P.; O’Dwyer, M.; Reilly, R. Automatic Classification of Heartbeats Using ECG Morphology and Heartbeat Interval Features. IEEE Trans. Biomed. Eng. 2004, 51, 1196–1206. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Zhu, H.; Pan, Y.; Wu, F.; Huan, R. Huan Optimized Electrode Locations for Wearable Single-Lead ECG Monitoring Devices: A Case Study Using WFEES Modules based on the LANS Method. Sensors 2019, 19, 4458. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Merone, M.; Soda, P.; Sansone, M.; Sansone, C. ECG databases for biometric systems: A systematic review. Expert Syst. Appl. 2017, 67, 189–202. [Google Scholar] [CrossRef]
Dataset | Index of MITDB Recordings | Amount | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
DS1 | 101 | 106 | 108 | 109 | 112 | 114 | 115 | 116 | 118 | 119 | 122 | 22 |
124 | 201 | 203 | 205 | 207 | 208 | 209 | 215 | 220 | 223 | 230 | ||
DS2 | 100 | 103 | 105 | 111 | 113 | 117 | 121 | 123 | 200 | 202 | 210 | 22 |
212 | 213 | 214 | 219 | 221 | 222 | 228 | 231 | 232 | 233 | 234 |
AAMI Class | MITDB Class | Sum | DS1 | DS2 |
---|---|---|---|---|
N | NOR, LBBB, RBBB, AE, NE | 91,043 | 45,486 | 45,557 |
S | AP, aAP, NP, SP | 2791 | 1411 | 1380 |
V | PVC, VE | 7235 | 3700 | 3535 |
F | fVN | 797 | 385 | 412 |
Q | P, fPN, U | 8002 | 3952 | 4050 |
Total amount | 109,868 | 54,934 | 54,934 |
Variables | Statistics | Remarks | |
---|---|---|---|
Participant summary | 123 patients | 55 males, 67 females | 1 not registered |
Age, years (mean ± SD 1) | 49 ± 23 | min: 1, max: 93 | 29 not registered |
Raw data duration, hours (mean ± SD 1) | 104.10 ± 56.74 | min: 1.64, max: 176.95 | - |
Class | Total Amount | Training Set | Test Set |
---|---|---|---|
N | 217,165 | 108,583 | 108,582 |
S | 3772 | 1886 | 1886 |
V | 8031 | 4015 | 4016 |
F | 73 | 37 | 36 |
Q | 1358 | 679 | 679 |
Sum | 230,599 | 115,300 | 115,299 |
Parameter | Initial Value | Tuning Range | Step |
---|---|---|---|
n_estimators (coarse-grained) n_estimators (fine-grained) | - | 10–300 | 10 |
- | 160–180 | 1 | |
max_depth | 5 | 2–20 | 1 |
subsample | 0.8 | 0.05–1 | 0.05 |
colsample_bytree | 44/56 | 1/56–1 | 1/56 |
reg_alpha | 0 | 0–0.05 | 0.005 |
eta | 0.17 | 0.01–0.3 | 0.01 |
Parameter | Value |
---|---|
n_estimators | 164 |
max_depth | 11 |
subsample | 0.6 |
colsample_bytree | 48/56 |
reg_alpha | 0.01 |
eta | 0.2 |
Ref. | (%) | N | S | V | F | Q | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
(%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | (%) | ||
[16] | 94.47 | 95.9 | 98.2 | - | 78.1 | 49.7 | - | 94.7 | 93.9 | - | 12.4 | 23.6 | - | - | - | - |
[17] | 96.58 | 97.6 | 98.5 | - | 76.8 | 74.0 | - | 93.8 | 92.4 | - | 79.6 | 62.4 | - | - | - | - |
[18] | 98.00 | 99.4 | 98.6 | 99.0 | 75.6 | 96.8 | 84.9 | 93.8 | 95.1 | 94.4 | 85.8 | 65.7 | 74.4 | - | - | - |
[19] | 98.41 | 99.5 | 99.0 | 99.2 | 77.9 | 87.7 | 82.3 | 94.5 | 95.7 | 95.1 | 82.1 | 83.7 | 82.9 | 98.5 | 99.3 | 98.9 |
[20] | 99.06 | 99.7 | 99.3 | 99.5 | 89.3 | 95.0 | 92.0 | 97.8 | 97.7 | 97.7 | 80.4 | 92.0 | 85.8 | 98.9 | 99.7 | 99.3 |
Ours | 99.14 | 99.8 | 99.3 | 99.6 | 87.1 | 97.6 | 92.1 | 97.4 | 97.9 | 97.6 | 78.2 | 93.9 | 85.3 | 99.0 | 99.7 | 99.4 |
Ref. | Time of the Training Phase 1 (min) | Time of the Test Phase 1,2 (s) | ||||
---|---|---|---|---|---|---|
Feature Extraction | Classifier Training | Total Time | Feature Extraction | Classifier Inference | Total Time | |
[16] | 23.36 ± 0.56 | 4.69 ± 0.01 | 28.05 ± 0.58 | 0.51 ± 0.00 | 0.63 ± 0.00 | 1.15 ± 0.00 |
[17] | - | - | 28.74 ± 0.35 | - | - | 8.55 ± 0.02 |
Ours | 22.11 ± 0.11 | 2.42 ± 0.02 | 24.53 ± 0.13 | 0.49 ± 0.00 | 0.33 ± 0.00 | 0.82 ± 0.00 |
ECG Recording Duration | Time of the Method Inference 1 (s) | ||
---|---|---|---|
Feature Extraction | Classifier Inference | Total Time | |
30min | 0.52 ± 0.08 | 0.32 ± 0.04 | 0.84 ± 0.14 |
60min | 0.99 ± 0.11 | 0.59 ± 0.07 | 1.59 ± 0.19 |
90min | 1.59 ± 0.13 | 0.91 ± 0.06 | 2.50 ± 0.20 |
120min | 2.12 ± 0.13 | 1.22 ± 0.05 | 3.34 ± 0.19 |
180min | 3.28 ± 0.16 | 1.79. ± 0.07 | 5.08 ± 0.26 |
360min | 6.72 ± 0.21 | 3.56 ± 0.09 | 10.30 ± 0.34 |
Duration | Time of the Method Inference 1 (ms) | ||
---|---|---|---|
Feature Extraction | Classifier Inference | Total Time | |
500 ms | 26.34 ± 0.11 | 16.25 ± 0.05 | 42.62 ± 0.17 |
1 s | 33.21 ± 0.12 | 17.28 ± 0.04 | 51.07 ± 0.19 |
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
Zhu, H.; Zhao, Y.; Pan, Y.; Xie, H.; Wu, F.; Huan, R. Robust Heartbeat Classification for Wearable Single-Lead ECG via Extreme Gradient Boosting. Sensors 2021, 21, 5290. https://doi.org/10.3390/s21165290
Zhu H, Zhao Y, Pan Y, Xie H, Wu F, Huan R. Robust Heartbeat Classification for Wearable Single-Lead ECG via Extreme Gradient Boosting. Sensors. 2021; 21(16):5290. https://doi.org/10.3390/s21165290
Chicago/Turabian StyleZhu, Huaiyu, Yisheng Zhao, Yun Pan, Hanshuang Xie, Fan Wu, and Ruohong Huan. 2021. "Robust Heartbeat Classification for Wearable Single-Lead ECG via Extreme Gradient Boosting" Sensors 21, no. 16: 5290. https://doi.org/10.3390/s21165290
APA StyleZhu, H., Zhao, Y., Pan, Y., Xie, H., Wu, F., & Huan, R. (2021). Robust Heartbeat Classification for Wearable Single-Lead ECG via Extreme Gradient Boosting. Sensors, 21(16), 5290. https://doi.org/10.3390/s21165290