| Literature DB >> 33806367 |
Junsheng Yu1, Xiangqing Wang1, Xiaodong Chen2, Jinglin Guo1.
Abstract
Premature ventricular contractions (PVCs), common in the general and patient population, are irregular heartbeats that indicate potential heart diseases. Clinically, long-term electrocardiograms (ECG) collected from the wearable device is a non-invasive and inexpensive tool widely used to diagnose PVCs by physicians. However, analyzing these long-term ECG is time-consuming and labor-intensive for cardiologists. Therefore, this paper proposed a simplistic but powerful approach to detect PVC from long-term ECG. The suggested method utilized deep metric learning to extract features, with compact intra-product variance and separated inter-product differences, from the heartbeat. Subsequently, the k-nearest neighbors (KNN) classifier calculated the distance between samples based on these features to detect PVC. Unlike previous systems used to detect PVC, the proposed process can intelligently and automatically extract features by supervised deep metric learning, which can avoid the bias caused by manual feature engineering. As a generally available set of standard test material, the MIT-BIH (Massachusetts Institute of Technology-Beth Israel Hospital) Arrhythmia Database is used to evaluate the proposed method, and the experiment takes 99.7% accuracy, 97.45% sensitivity, and 99.87% specificity. The simulation events show that it is reliable to use deep metric learning and KNN for PVC recognition. More importantly, the overall way does not rely on complicated and cumbersome preprocessing.Entities:
Keywords: deep metric learning; electrocardiogram; k-nearest neighbors classifier; premature ventricular contraction
Mesh:
Year: 2021 PMID: 33806367 PMCID: PMC8000997 DOI: 10.3390/bios11030069
Source DB: PubMed Journal: Biosensors (Basel) ISSN: 2079-6374
The most common types of arrhythmia.
| Type | Characteristic |
|---|---|
| Tachycardia | Heart rate over 100 beats per minute |
| Bradycardia | Heart rate below 60 beats per minute |
| Supraventricular arrhythmias | Arrhythmias that begin in the heart’s upper chambers (atrium) |
| Ventricular arrhythmias | Arrhythmias that begin in the heart’s lower chambers (ventricles) |
| Bradyarrhythmias | Arrhythmias that caused by a dysfunction in the cardiac conduction system |
Figure 1A normal heartbeat in an electrocardiogram (ECG).
The cause of generating each wave in ECG.
| Wave | Cause |
|---|---|
| P wave | Depolarization of the atrium |
| QRS complex | Depolarization of the ventricles |
| T wave | Repolarization of the ventricles |
| U wave | Repolarization of the Purkinje fibers |
The patterns of premature ventricular contraction (PVC) occurrence.
| Patterns | Description |
|---|---|
| Bigeminy | Every other beat is a PVC |
| Trigeminy | Every third beat is a PVC |
| Quadrigeminy | Every fourth beat is a PVC |
| Couplet | Two consecutive PVCs |
| NSVT | Three-thirty consecutive PVCs |
Some algorithms for detecting PVC.
| Reference | Features | Classifier | Accuracy | Sensitivity | Specificity |
|---|---|---|---|---|---|
| [ | Eight features based on RQA | KNN and PNN | 92.25% | 73.33% | 94.74% |
| [ | Template-matching procedures | Threshold method | 98.2% | 93.1% | 81.4% |
| [ | 12 features based on FT | ANN | 98.54% | 99.93% | 98.3% |
| [ | 8 generalized wavelets transformed coefficients | FNN | 99.8% | 99.21% | 99.93% |
| [ | 10 ECG morphological features and one interval feature | MLP | 95.4% | - | - |
| [ | Wavelet detail coefficients | Threshold method | 98.48% | 97.21% | 98.67% |
| [ | Chaotic feature | Threshold method | 99.1% | 93.6% | - |
| [ | R-R interval, pattern of QRS complex, width of QRS complex, and ST-segment level | Main parameters algorithm | - | 97.75% | 98.8% |
| [ | Using the ICA algorithm to extracts features | K-means and fuzzy C-means | 80.94% | 81.1% | 80.1% |
| [ | The width and gradient of the QRS wave | SSVM | 99.46% | 98.94% | 99.99% |
| [ | R-R interval and QRS width | ANN | 96.29% | 94.58% | 96.59% |
| [ | R-peak, R-R, QRS, VAT, Q-peak, and S-peak | ANN | 99.41% | 96.08% | - |
| [ | R-R interval, QS interval, QR amplitude, and RS amplitude | ANN | 97.34% | - | - |
| [ | Feature extraction of Lyapunov exponent curve | LVQNN | 98.9% | 90.26% | 92.31% |
| [ | Using the PCA, SOM, ICA algorithm to extracts features | KNN | 99.63% | 99.29% | 99.89% |
| [ | Four morphological characteristics | DHMM | 96.59% | 97.57% | 96.85% |
| [ | Feature selection with GA | KNN | 99.69% | 99.46% | 99.91% |
| [ | Form factor and R-R interval | SVM | 95% | - | - |
| [ | A set of geometrical features | SVM | 99% | 98.5% | 99.5% |
| [ | 80 features based on DFT | BCM | 98.3% | 100% | |
| [ | R-R interval, R amplitude, and QRS area | RF | 96.38% | 97.88% | 97.56% |
| [ | Resampled QRS waveform | ANN | 95% | - | - |
| [ | 20-dimensional feature vector obtained by using SAE | ANN | 99.4% | 97.9% | 91.8% |
| [ | Learned features automatically | LCNN, LSTM, and rules inference | 99.41% | 97.59% | 99.54% |
| [ | Learned features automatically | 1D CNN and 2D CNN | 88.5% | - | - |
| [ | Learned features automatically | RNN | 96–99% | 99–100% | 94–96% |
| [ | Learned features automatically | 2D CNN | 90.84% | 78.6% | 99.86% |
Abbreviations: Recurrence quantification analysis (RQA), Fourier transform (FT), independent component analysis (ICA), principal component analysis (PCA), self-organizing maps (SOM), genetic algorithm (GA), discrete Fourier transform (DFT), sparse autoencoder SAEK-nearest neighbor (KNN), probabilistic neural network (PNN), artificial neural networks (ANN), fuzzy neural network (FNN), multilayer perceptron (MLP), support vector machine (SVM), swarm-based support vector machine (SSVM), learning vector quantization neural network (LVQNN), discrete hidden Markov model (DHMM), Bayesian classification models (BCM), random forest (RF), lead convolutional neural network (LCNN), long short-term memory network (LSTM), one-dimensional convolutional neural network (1D CNN), two-dimensional convolutional neural network (2D CNN), recurrent neural network (RNN). Further, “-” means that relevant information is not mentioned in the literature.
Figure 2The waveforms of PVC and normal heartbeat. The two ECGs in this picture are from the same person. Each symbol is defined as follows. N (normal heartbeat); V (premature ventricular contraction); T0 (0.20 s); T1 (R-R interval); T2 (R-R interval); T3 (R-R interval); T4 (R-R interval); QRS-N (QRS complex of normal heartbeat); QRS-V (QRS complex of PVC). The important thing is that T3 and T4 are usually equal, and the sum of them is generally similar to the sum of T1 and T2. The blue dotted line indicates the location of the R wave peak in each heartbeat.
Dividing ECG into a training set and test set.
| Dataset | Records | Normal Heartbeat | PVC |
|---|---|---|---|
| Training set | 101, 106, 108, 109, 112, 114, 115, 116, 118, 119, 122, | 35,640 | 2851 |
| Test set | 100, 103, 105, 111, 113, 117, 121, 123, 200, 202, 210, | 33,868 | 2548 |
In this table, “Records” represents ECG recordings in the training set or test set. The “Normal heartbeat” and “PVC” represent the numbers of regular heartbeats and PVC in the training set or test set.
Figure 3Block diagram of the proposed study.
Figure 4The proposed deep metric learning model’s basic architecture. Take “Group_1 32@33” as an example to comprehend the convolution group. “Group _1” is the convolution group’s name; “32@33” represents the number and size of the one-dimensional convolutional layer’s convolution kernels in the convolution group. Each convolutional group contains two 1D convolutional layers, two batch normalization layers, two activation functions, and one max-pooling layer.
Three types of pooling operations.
| Type | Operation |
|---|---|
| Max-pooling | The maximum pixel value of the batch is selected |
| Min-pooling | The minimum pixel value of the batch is selected |
| Average-pooling | The average value of all the pixels in the batch is selected |
Here, the “batch” means a group of features that are the overlapping parts of these two vectors: The pooling layer’s kernel and the input vector.
Figure 5The result of applying different denoising algorithms on the ECG. (a) shows a 3-s ECG without denoising; (b) and (c) illustrate the effect of using finite impulse response (FIR) filters and median filters on the ECG, respectively; (d) shows the impact of using FIR filters and median filters on the ECG.
The parameters related to the experiment.
| Batch Size | Number of Features | Margin | Distance | Epsilon | Optimizer | LR | WD |
|
|---|---|---|---|---|---|---|---|---|
| 32 | 32 | 0.2 | Cosine Similarity | 0 | Adam | 0.0001 | 0 | 1 |
The performance of applying different noise reduction algorithms on the proposed method.
| Noise Reduction Algorithms | Acc (%) | Se (%) | Sp (%) | P+ (%) | P− (%) | Time |
|---|---|---|---|---|---|---|
| None | 99.63 | 96.74 | 99.85 | 97.97 | 99.76 | 0.00 |
| FIR filters | 99.56 | 96.66 | 99.78 | 97.04 | 99.75 | 0.23 |
| Median filters | 99.53 | 96.9 | 99.73 | 96.37 | 99.77 | 6.58 |
| FIR filters and median filters | 99.46 | 96.15 | 99.71 | 96.12 | 99.71 | 7.04 |
Here, the “Time” means the time it takes to denoise a half-hour ECG.
The results of the varying number of features.
| The Number of Features | TN | FP | FN | TP | Acc (%) | Se (%) | Sp (%) | P+ (%) | P− (%) |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 33,808 | 60 | 91 | 2457 | 99.59 | 96.43 | 99.82 | 97.62 | 99.73 |
| 8 | 33,800 | 68 | 89 | 2459 | 99.57 | 96.51 | 99.8 | 97.31 | 99.74 |
| 32 | 33,817 | 51 | 83 | 2465 | 99.63 | 96.74 | 99.85 | 97.97 | 99.76 |
| 64 | 33,802 | 66 | 84 | 2464 | 99.59 | 96.7 | 99.81 | 97.39 | 99.75 |
Figure 6Visualizing the features of training data.
Figure 7The confusion matrix about testing the pooling layer.
The detailed results of testing the pooling layer.
| Pooling Type | Acc (%) | Se (%) | Sp (%) | P+ (%) | P− (%) |
|---|---|---|---|---|---|
| Max-pooling | 99.63 | 96.74 | 99.85 | 97.97 | 99.76 |
| Average-pooling | 99.59 | 97.49 | 99.74 | 96.62 | 99.81 |
The experiment results about the margin and epsilon.
| Margin | Epsilon | TN | FP | FN | TP | Acc (%) | Se (%) | Sp (%) | P+ (%) | P− (%) |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.1 | 0.0 | 33,824 | 44 | 65 | 2483 | 99.70 | 97.45 | 99.87 | 98.26 | 99.81 |
| 0.2 | 0.0 | 33,817 | 51 | 83 | 2465 | 99.63 | 96.74 | 99.85 | 97.97 | 99.76 |
| 0.4 | 0.0 | 33,812 | 56 | 69 | 2479 | 99.66 | 97.29 | 99.83 | 97.79 | 99.80 |
| 0.8 | 0.0 | 33,786 | 82 | 49 | 2499 | 99.64 | 98.08 | 99.76 | 96.82 | 99.86 |
| 0.1 | 0.1 | 33,808 | 60 | 78 | 2470 | 99.62 | 96.94 | 99.82 | 97.63 | 99.77 |
| 0.1 | 0.2 | 33,787 | 81 | 64 | 2484 | 99.60 | 97.49 | 99.76 | 96.84 | 99.81 |
| 0.1 | 0.3 | 33,795 | 73 | 70 | 2478 | 99.61 | 97.25 | 99.78 | 97.14 | 99.79 |
The performance of the KNN classifier with different K values.
| K | TN | FP | FN | TP | Acc (%) | Se (%) | Sp (%) | P+ (%) | P− (%) |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 33,824 | 44 | 65 | 2483 | 99.7007 | 97.449 | 99.8701 | 98.2588 | 99.8082 |
| 3 | 33,824 | 44 | 66 | 2482 | 99.6979 | 97.4097 | 99.8701 | 98.2581 | 99.8053 |
| 5 | 33,825 | 43 | 68 | 2480 | 99.6952 | 97.3312 | 99.873 | 98.2957 | 99.7994 |
| 9 | 33,822 | 46 | 69 | 2479 | 99.6842 | 97.292 | 99.8642 | 98.1782 | 99.7964 |
| 11 | 33,822 | 46 | 70 | 2478 | 99.6815 | 97.2527 | 99.8642 | 98.1775 | 99.7935 |
Figure 8Comparison with other literature.