| Literature DB >> 35890769 |
Eko Sakti Pramukantoro1,2, Akio Gofuku1.
Abstract
Heartbeat monitoring may play an essential role in the early detection of cardiovascular disease. When using a traditional monitoring system, an abnormal heartbeat may not appear during a recording in a healthcare facility due to the limited time. Thus, continuous and long-term monitoring is needed. Moreover, the conventional equipment may not be portable and cannot be used at arbitrary times and locations. A wearable sensor device such as Polar H10 offers the same capability as an alternative. It has gold-standard heartbeat recording and communication ability but still lacks analytical processing of the recorded data. An automatic heartbeat classification system can play as an analyzer and is still an open problem in the development stage. This paper proposes a heartbeat classifier based on RR interval data for real-time and continuous heartbeat monitoring using the Polar H10 wearable device. Several machine learning and deep learning methods were used to train the classifier. In the training process, we also compare intra-patient and inter-patient paradigms on the original and oversampling datasets to achieve higher classification accuracy and the fastest computation speed. As a result, with a constrain in RR interval data as the feature, the random forest-based classifier implemented in the system achieved up to 99.67% for accuracy, precision, recall, and F1-score. We are also conducting experiments involving healthy people to evaluate the classifier in a real-time monitoring system.Entities:
Keywords: deep learning; heartbeats; machine learning; wearable sensor
Mesh:
Year: 2022 PMID: 35890769 PMCID: PMC9320854 DOI: 10.3390/s22145080
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.847
AAMI recommendation of heartbeats.
| Normal (N) | Supraventricular Ectopic Beat (SVEB) | Ventricular Ectopic Beat (VEB) | Fusion Beat (F) | Unknown Beat (Q) |
|---|---|---|---|---|
| Normal beat (N) | Atrial premature beat (A) | Premature ventricular contraction (V) | Fusion of ventricular and normal beat (F) | Paced beat (/) |
| Left bundle branch block (L) | Aberrated atrial premature beat (a) | Ventricular escape beat (E) | Fusion of paced and normal beat (f) | |
| Right bundle branch block (R) | Nodal (junctional) premature beat (J) | Unclassified beat (Q) | ||
| Atrial escape beat (e) | Supraventricular premature beat (S) | |||
| Nodal junctional escape beat (j) |
RR interval feature series.
| Features Series | Descriptions |
|---|---|
| RR0 | Current RRi value |
| RR-1 | Previous RRi value |
| RR+1 | Next RRi value |
| RR0/avgRR | Current RRi/average of RRi within 42 s |
| tRR0 | (CurrentRR-averageRR)/stddevRR |
| RR-1/avgRR | Previous RRi/average of RRi |
| RR-1/RR0 | Previous RRi/ current RRi within 42 s |
| RR+1/avgRR | Next RRi, average of RRi within 42 s |
| RR+1/RR0 | Next RRi, current RRi |
Distribution of heartbeats class in MIT-BIH data.
| Original | ROS | SMOTE | ADASYN | |
|---|---|---|---|---|
| number of N | 90,125 | 90,125 | 90,125 | 90,125 |
| number of S | 2781 | 90,125 | 90,125 | 90,332 |
| number of V | 7009 | 90,125 | 90,125 | 89,215 |
| number of F | 803 | 90,125 | 90,125 | 90,293 |
| number of Q | 15 | 90,125 | 90,125 | 90,120 |
Figure 1Plotting data of RR interval feature.
Model parameters.
| Model | Parameter |
|---|---|
| DT | default |
| GB | estimator = 100, learning rate = 0.1, max. depth = 3, random state = 0. |
| kNN | k = 3. |
| MLP | network solver = adam, alpha=1e-5, hidden layer = 128, input layer = 9 output layer = 5, max iteration = 600, random state = 42. |
| RF | tree = 30, random state = 42. |
| SVM | kernel = RBF, gamma = 0.8, C = 1. |
Deep learning model summary.
| Layer (Type) | Output Shape | Param |
|---|---|---|
| dense (Dense) | 314,857, 9 | 80 |
| dense_1 (Dense) | 314,857, 64 | 576 |
| dense_2 (Dense) | 314,857, 128 | 8320 |
| dense_3 (Dense) | 314,857, 512 | 66,048 |
| dense_4 (Dense) | 314,857, 128 | 65,664 |
| dense_5 (Dense) | 314,857, 64 | 8256 |
| dense_6 (Dense) | 314857, 5 | 325 |
Splitting the data.
| Protocol Split | Random Split | Oversampling | ||||
|---|---|---|---|---|---|---|
| Train | Test | Train | Test | Train | Test | |
| number of N | 45,866 | 44,259 | 63,150 | 26,975 | 63,050 | 27,075 |
| number of S | 944 | 1837 | 1973 | 808 | 63,225 | 26900 |
| number of V | 3788 | 3221 | 4845 | 2164 | 63042 | 27,083 |
| number of F | 415 | 388 | 536 | 267 | 63,076 | 27049 |
| number of Q | 8 | 7 | 9 | 6 | 63,044 | 27,081 |
| Total | 51,021 | 49,712 | 70,513 | 30,220 | 315,437 | 135,188 |
Result of machine learning using protocol split.
| Method | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) |
|---|---|---|---|---|
| DT | 89.15 | 88.30 | 89.15 | 88.64 |
| GB | 89.08 | 89.10 | 89.08 | 88.44 |
| KNN | 90.76 | 88.42 | 90.76 | 89.42 |
| NN | 92.50 | 91.36 | 92.50 | 91.46 |
| RF | 91.81 | 89.24 | 91.81 | 90.29 |
| SVM | 92.57 | 90.23 | 92.57 | 90.81 |
| ANN | 91.44 | 88.59 | 91.04 | 89.72 |
Confusion matrix SVM.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 43,588 | 49 | 622 | 0 | 0 | |
| S | 1159 | 79 | 599 | 0 | 0 | |
| V | 808 | 64 | 2349 | 0 | 0 | |
| F | 385 | 0 | 3 | 0 | 0 | |
| Q | 6 | 1 | 0 | 0 | 0 | |
Confusion matrix NN.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 43,170 | 199 | 872 | 18 | 0 | |
| S | 789 | 279 | 768 | 1 | 0 | |
| V | 619 | 55 | 2535 | 12 | 0 | |
| F | 382 | 0 | 5 | 1 | 0 | |
| Q | 6 | 0 | 1 | 0 | 0 | |
Figure 2Decision boundary using logistic regression.
Result of machine learning using random split dataset.
| Method | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) |
|---|---|---|---|---|
| DT | 94.08 | 94.12 | 94.08 | 94.10 |
| GB | 95.57 | 95.29 | 95.57 | 95.21 |
| KNN | 95.08 | 94.50 | 95.08 | 94.53 |
| NN | 95.82 | 95.53 | 95.82 | 95.46 |
| RF | 96.22 | 95.94 | 96.21 | 95.89 |
| SVM | 95.05 | 93.97 | 95.05 | 94.35 |
| ANN | 96.35 | 96.07 | 96.35 | 96.09 |
Confusion matrix RF.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 26,734 | 20 | 206 | 15 | 0 | |
| S | 129 | 594 | 85 | 0 | 0 | |
| V | 420 | 43 | 1698 | 3 | 0 | |
| F | 211 | 0 | 6 | 50 | 0 | |
| Q | 6 | 0 | 0 | 0 | 0 | |
Confusion matrix ANN.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 26,776.2 | 28 | 214.6 | 15.2 | 0 | |
| S | 112.8 | 632.6 | 88.6 | 0 | 0 | |
| V | 392.6 | 44.6 | 1663 | 10.8 | 0 | |
| F | 178 | 0 | 9.4 | 46.6 | 0 | |
| Q | 5.75 | 0.75 | 0.5 | 0 | 0 | |
Result of training using over-sampled dataset.
| Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| R | S | A | R | S | A | R | S | A | R | S | A | |
| DT |
| 96.50 | 96.08 | 99.32 | 96.49 | 96.07 | 99.31 | 96.50 | 96.08 | 99.31 | 96.49 | 96.06 |
| GB | 89.57 | 86.73 | 78.26 | 89.62 | 86.70 | 77.94 | 89.57 | 86.73 | 78.26 | 89.55 | 86.67 | 78.01 |
| KNN |
| 97.55 | 97.49 | 98.99 | 97.71 | 97.56 | 98.97 | 97.68 | 97.49 | 98.96 | 97.64 | 97.44 |
| NN | 89.88 | 90.06 | 84.48 | 90.17 | 90.19 | 84.54 | 89.88 | 90.06 | 84.48 | 89.81 | 89.96 | 84.23 |
| RF |
| 98.15 | 98.08 | 99.67 | 98.15 | 98.09 | 99.67 | 98.15 | 98.08 | 99.67 | 98.14 | 98.07 |
| SVM | 87.87 | 87.43 | 79.83 | 87.93 | 87.46 | 79.59 | 87.87 | 87.43 | 79.83 | 87.78 | 87.32 | 79.39 |
| ANN |
| 96.20 | 95.85 | 97.54 | 96.22 | 95.81 | 97.51 | 96.20 | 95.85 | 97.49 | 96.18 | 95.83 |
Confusion matrix RF-ROS.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 26,626 | 32 | 370 | 44 | 2 | |
| S | 0 | 26,900 | 0 | 0 | 0 | |
| V | 0 | 0 | 27,083 | 0 | 0 | |
| F | 0 | 0 | 0 | 27,049 | 0 | |
| Q | 0 | 0 | 0 | 0 | 27,081 | |
Confusion matrix DT-ROS.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 26,148 | 141 | 576 | 205 | 5 | |
| S | 0 | 26,900 | 0 | 0 | 0 | |
| V | 0 | 0 | 27,083 | 0 | 0 | |
| F | 0 | 0 | 0 | 27,049 | 0 | |
| Q | 0 | 0 | 0 | 0 | 27,081 | |
Confusion matrix ANN-ROS.
| Classifier | ||||||
|---|---|---|---|---|---|---|
| Reference |
|
|
|
|
| |
| N | 24,773.4 | 255.8 | 943.4 | 1073.6 | 27.8 | |
| S | 84.2 | 26,670.75 | 146.5 | 2.4 | 0 | |
| V | 334.4 | 123.8 | 26,277.75 | 310.4 | 0.4 | |
| F | 50 | 0 | 13.6 | 26,992 | 0 | |
| Q | 0 | 0 | 0 | 0 | 27,082 | |
Works comparison following AAMI recommendation.
| Classifier | Feature | No. of Features | Data Scheme | Class | Accuracy (%) |
|---|---|---|---|---|---|
| Ensemble SVM [ | RR interval, HOS, wavelet, time domain, morphology | 45 | Inter-patient | 5 | 94.5 |
| Random Forest [ | RR interval, HBF, time domain, morphology | 6 | Inter-patient | 5 | 96.14 |
| Naïve bayes [ | HOS | 4 | Inter-patient | 5 | 94 |
| SVM [ | RR-Interval, DCT Random projection | 33 | Inter-patient | 5 | 93.1 |
| Ensemble of BDT [ | RR-interval, DCT random projection | 33 | Inter-patient | 5 | 96.15 |
| Ensemble SVM [ | RR-Interval, Random projection | 101 | Inter-patient | 5 | 93.8 |
| Deep neural network [ | RR interval, Wavelet, HOS, morphologcy | 45 | Inter-patient | 4 | 89.25 |
| This work (SVM) | RR interval | 9 | Inter-patient | 5 | 92.57 |
| This work (NN) | RR interval | 9 | Inter-patient | 5 | 92.50 |
| This work (RF) | RR interval | 9 | Intra-patient | 5 | 96.22 |
| This work (ANN) | RR interval | 9 | Intra-patient | 5 |
|
| This work (RF) | RR interval | 9 | Intra-patient(O) | 5 |
|
| This work (DT) | RR interval | 9 | Intra-patient(O) | 5 |
|
Figure 3Class diagram of real-time monitoring system.
Figure 4An output of real-time prediction of heartbeat.
Experiment result on healthy person within 20 min.
| Average Processing Time (Second) | Found Beat | Number Beats | Average RSSI (dBm) | |||||
|---|---|---|---|---|---|---|---|---|
| N | S | V | F | Q | ||||
| RF | 0.108739 | 1172 | 0 | 0 | 0 | 0 | 1172 | −49.15 |
| ANN | 0.043825 | 1172 | 0 | 0 | 0 | 0 | 1172 | −62.80 |
| ANN-ROS | 0.043033 | 1177 | 0 | 0 | 0 | 0 | 1177 | −69.98 |
| DT-ROS | 0.000359437 | 1169 | 0 | 0 | 0 | 0 | 1169 | −67.23 |
| RF-SMOT | 0.108851 | 1177 | 0 | 0 | 0 | 0 | 1177 | −64.63 |
| KNN-ROS | 0.001943876 | 1171 | 0 | 0 | 0 | 0 | 1177 | −52.47 |
| RF-ROS | 0.10563 | 1176 | 0 | 0 | 0 | 0 | 1176 | −45.032 |
Result the of experiment on six healthy people within 30 min.
| Participant | Age | Gender | Found Beat | Average RSSI (dBm) | ||||
|---|---|---|---|---|---|---|---|---|
| N | S | V | F | Q | ||||
| 1 | 33 | M | 1764 | 0 | 0 | 0 | 0 | −63.7 |
| 2 | 34 | M | 1773 | 0 | 0 | 0 | 0 | −59.1 |
| 3 | 36 | M | 1753 | 0 | 0 | 0 | 0 | −59.3 |
| 4 | 35 | M | 1773 | 0 | 0 | 0 | 0 | −46.9 |
| 5 | 28 | F | 1752 | 0 | 0 | 0 | 0 | −72.8 |
| 6 | 33 | F | 1772 | 0 | 0 | 0 | 0 | −60.5 |