| Literature DB >> 34960267 |
Sandra Śmigiel1, Krzysztof Pałczyński2, Damian Ledziński2.
Abstract
Deep Neural Networks (DNNs) are state-of-the-art machine learning algorithms, the application of which in electrocardiographic signals is gaining importance. So far, limited studies or optimizations using DNN can be found using ECG databases. To explore and achieve effective ECG recognition, this paper presents a convolutional neural network to perform the encoding of a single QRS complex with the addition of entropy-based features. This study aims to determine what combination of signal information provides the best result for classification purposes. The analyzed information included the raw ECG signal, entropy-based features computed from raw ECG signals, extracted QRS complexes, and entropy-based features computed from extracted QRS complexes. The tests were based on the classification of 2, 5, and 20 classes of heart diseases. The research was carried out on the data contained in a PTB-XL database. An innovative method of extracting QRS complexes based on the aggregation of results from established algorithms for multi-lead signals using the k-mean method, at the same time, was presented. The obtained results prove that adding entropy-based features and extracted QRS complexes to the raw signal is beneficial. Raw signals with entropy-based features but without extracted QRS complexes performed much worse.Entities:
Keywords: ECG signal; PTB-XL; QRS complex; R wave detection; classification; deep learning
Mesh:
Year: 2021 PMID: 34960267 PMCID: PMC8705269 DOI: 10.3390/s21248174
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1General overview diagram of the method.
List of classes and subclasses of used records.
| Class | Subclass | Number of Records | Description |
|---|---|---|---|
| NORM | NORM | 7185 | Normal ECG |
| CD | LAFB/LPFB | 881 | Left anterior fascicular block, left posterior fascicular block |
| IRBBB | 798 | Incomplete right bundle branch block | |
| CLBBB | 527 | (Complete) left bundle branch block | |
| CRBBB | 385 | (Complete) right bundle branch block | |
| IVCD | 326 | Nonspecific intraventricular conduction disturbance | |
| _AVB | 204 | First-degree AV block, second-degree AV block, third-degree AV block | |
| WPW | 67 | Wolff–Parkinson–White syndrome | |
| ILBBB | 44 | Incomplete left bundle branch block | |
| STTC | STTC | 1713 | Non-diagnostic T abnormalities, suggests digitalis effect, long QT interval, ST-T changes compatible with ventricular aneurysm, compatible with electrolyte abnormalities |
| NST_ | 478 | Nonspecific ST changes | |
| ISCA | 429 | In anterolateral leads, in anteroseptal leads, in lateral leads, in anterior leads | |
| ISC_ | 297 | Ischemic ST-T changes | |
| ISCI | 147 | In inferior leads, in inferolateral leads | |
| MI | AMI | 1636 | Anterior myocardial infarction, anterolateral myocardial infarction, in anteroseptal leads, in anterolateral leads, in lateral leads |
| IMI | 1272 | Inferior myocardial infarction, inferolateral myocardial infarction, inferoposterolateral myocardial infarction, inferoposterior myocardial infarction, in inferior leads, in inferolateral leads | |
| LMI | 28 | Lateral myocardial infarction | |
| HYP | LVH | 733 | Left ventricular hypertrophy |
| LAO/LAE | 49 | Left atrial overload/enlargement | |
| RAO/RAE | 33 | Right atrial overload/enlargement |
Figure 2Sample I-lead signals for selected records of various classes with R wave labeled using various techniques.
Figure 3Mean absolute error of the determination of the R-peak number.
Figure 4The standard deviation of error of the determination of the R-peak number.
Figure 5Examples of I-lead signals for selected records of various classes with labeled R wave (green) and places for section cuts (red).
Figure 6Neural network architectures. Networks are composed of unique combinations of modules, each interpreting a different type of data. The modules’ results are concatenated and processed by a fully-connected layer and softmax function.
The architecture of neural network encoding raw signal.
| Layer | Channels In | Channels Out | Kernel Size | Padding | Stride |
|---|---|---|---|---|---|
| Conv1d | 12 | 24 | 3 | 1 | 1 |
| MaxPool1d | 24 | 24 | 3 | 0 | 3 |
| Conv1d | 24 | 48 | 3 | 1 | 1 |
| MaxPool1d | 48 | 48 | 3 | 0 | 3 |
| Conv1d | 48 | 64 | 3 | 1 | 1 |
| MaxPool1d | 64 | 64 | 3 | 0 | 3 |
| Conv1d | 64 | 72 | 3 | 1 | 1 |
| MaxPool1d | 72 | 72 | 3 | 0 | 3 |
| Conv1d | 72 | 96 | 3 | 1 | 1 |
| MaxPool1d | 96 | 96 | 3 | 0 | 3 |
| Conv1d | 96 | 2 | 1 | 0 | 1 |
The architecture of neural network encoding entropy-based features extracted from raw signal.
| Layer | Input | Output |
|---|---|---|
| Fully-Connected | 156 | 20 |
| Leaky ReLU | 20 | 20 |
| Fully-Connected | 20 | 20 |
Figure 7Boxplot presenting distribution of count of QRS complexes in ECG signals of the PTB-XL dataset. The most frequent value is 8, the smallest is 4, and the highest is 15. The outliers are numbers from 16 to 26.
The architecture of the QRS complex encoding Deep Neural Network.
| Layer | Channels In | Channels Out | Kernel Size | Padding | Stride |
|---|---|---|---|---|---|
| Conv1d | 12 | 24 | 3 | 1 | 1 |
| MaxPool1d | 24 | 24 | 2 | 0 | 2 |
| Conv1d | 24 | 48 | 3 | 0 | 1 |
| MaxPool1d | 48 | 48 | 2 | 0 | 2 |
| Conv1d | 48 | 96 | 3 | 0 | 1 |
| MaxPool1d | 96 | 96 | 2 | 0 | 2 |
| Conv1d | 96 | 2 | 1 | 0 | 1 |
The architecture of neural network encoding entropy-based features extracted from the QRS complexes.
| Layer | Input | Output |
|---|---|---|
| Fully-Connected | 312 | 20 |
| Leaky ReLU | 20 | 20 |
| Fully-Connected | 20 | 20 |
Results for two-class classification.
| Name | Acc | Acc Avg|Std | F1 | F1 Avg|Std | AUC | AUC Avg|Std |
|---|---|---|---|---|---|---|
| QRS entropy, Raw signal, Raw signal entropy | 90.9–89.6% | 90.2%|0.5 | 90.7–89.3 | 90.0|0.5 | 96.6–95.5 | 96.3|0.4 |
| Raw signal, Raw signal entropy | 90.7–88.8% | 89.8%|0.7 | 90.6–88.6 | 89.6|0.7 | 96.6–95.7 | 96.1|0.4 |
| QRS entropy, Raw signal | 90.6–89.2% | 89.9%|0.5 | 90.4–89.1 | 89.7|0.5 | 96.6–95.4 | 96.1|0.5 |
| QRS, QRS entropy, Raw signal | 90.5–89.3% | 90.0%|0.4 | 90.4–89.1 | 89.7|0.4 | 96.5–95.1 | 96.0|0.5 |
| Raw signal | 90.5–89.3% | 90.0%|0.4 | 90.2–89.0 | 89.7|0.4 | 96.6–95.7 | 96.2|0.4 |
| QRS | 90.5–89.2% | 89.7%|0.4 | 90.2–89.0 | 89.4|0.4 | 95.9–94.8 | 95.5|0.4 |
| QRS, Raw signal entropy | 90.5–88.2% | 89.8%|0.9 | 90.3–88.0 | 89.5|0.9 | 96.2–95.0 | 95.7|0.4 |
| QRS, QRS entropy, Raw signal entropy | 90.2–89.0% | 89.8%|0.4 | 89.9–88.8 | 89.5|0.4 | 96.3–95.8 | 96.0|0.2 |
| QRS, QRS entropy, Raw signal, Raw signal entropy | 90.2–89.3% | 89.8%|0.4 | 90.1–89.0 | 89.6|0.4 | 96.5–95.6 | 96.0|0.4 |
| QRS, Raw signal | 90.2–88.7% | 89.8%|0.6 | 90.1–88.6 | 89.5|0.6 | 96.4–95.6 | 96.0|0.3 |
| QRS, QRS entropy | 90.1–89.2% | 89.7%|0.3 | 89.9–89.0 | 89.4|0.3 | 96.2–95.2 | 95.9|0.4 |
| QRS, Raw signal, Raw signal entropy | 89.9–88.9% | 89.5%|0.4 | 89.6–88.7 | 89.3|0.3 | 96.5–95.1 | 95.9|0.6 |
| QRS entropy | 87.0–86.3% | 86.5%|0.3 | 86.7–85.9 | 86.2|0.3 | 94.2–92.8 | 93.6|0.5 |
| QRS entropy, Raw signal entropy | 86.7–86.2% | 86.6%|0.2 | 86.4–86.0 | 86.3|0.2 | 94.2–93.5 | 93.8|0.3 |
| Raw signal entropy | 83.9–82.1% | 83.4%|0.7 | 83.5–81.6 | 82.9|0.7 | 91.6–90.2 | 91.1|0.5 |
Results for five-class classification.
| Name | Acc | Acc Avg|Std | F1 | F1 Avg|Std | AUC | AUC Avg|Std |
|---|---|---|---|---|---|---|
| QRS, Raw signal, Raw signal entropy | 79.1–74.9% | 76.3%|1.6 | 72.0–65.8 | 68.3|2.4 | 91.8–88.6 | 90.3|1.2 |
| QRS, QRS entropy | 78.0–75.2% | 76.2%|1.0 | 70.0–66.9 | 68.0|1.2 | 91.0–89.4 | 90.3|0.6 |
| QRS, QRS entropy, Raw signal | 77.7–73.6% | 76.2%|1.8 | 70.3–62.7 | 67.5|3.3 | 91.8–89.5 | 90.4|0.9 |
| QRS, QRS entropy, Raw signal entropy | 77.4–75.2% | 76.0%|0.8 | 69.6–66.7 | 68.2|1.3 | 91.3–90.4 | 90.7|0.3 |
| QRS entropy, Raw signal, Raw signal entropy | 77.2–75.3% | 75.9%|0.7 | 70.5–66.5 | 67.7|1.6 | 90.8–86.8 | 89.2|1.5 |
| Raw signal | 77.2–74.0% | 75.3%|1.2 | 68.1–64.7 | 66.2|1.2 | 89.4–86.3 | 87.5|1.3 |
| QRS | 77.1–75.1% | 75.8%|0.8 | 69.6–66.8 | 67.9|1.0 | 90.9–87.5 | 89.6|1.3 |
| QRS, QRS entropy, Raw signal, Raw signal entropy | 76.9–74.8% | 75.8%|0.8 | 68.4–66.2 | 67.4|0.9 | 91.5–90.1 | 90.9|0.5 |
| QRS, Raw signal | 76.7–74.9% | 75.8%|0.6 | 68.6–66.4 | 67.7|0.9 | 91.7–89.7 | 90.5|0.7 |
| QRS, Raw signal entropy | 76.5–73.5% | 75.5%|1.2 | 68.4–65.0 | 66.9|1.2 | 90.1–88.3 | 89.6|0.7 |
| QRS entropy, Raw signal | 76.5–74.7% | 75.8%|0.6 | 68.9–65.8 | 67.1|1.3 | 90.4–89.2 | 89.8|0.4 |
| Raw signal, Raw signal entropy | 76.2–73.9% | 75.1%|1.0 | 66.8–61.8 | 64.4|1.8 | 88.9–87.0 | 88.2|0.9 |
| QRS entropy, Raw signal entropy | 70.5–68.2% | 69.3%|0.9 | 61.7–57.2 | 59.3|1.8 | 88.5–86.7 | 87.3|0.6 |
| QRS entropy | 70.0–68.0% | 68.8%|0.7 | 60.4–58.3 | 59.3|0.8 | 87.4–86.4 | 87.0|0.4 |
| Raw signal entropy | 65.1–63.7% | 64.3%|0.5 | 54.4–52.0 | 53.2|0.9 | 85.3–83.1 | 84.4|0.9 |
Results for 20-class classification.
| Name | Acc | Acc Avg|Std | F1 | F1 Avg|Std | AUC | AUC Avg|Std |
|---|---|---|---|---|---|---|
| QRS, QRS entropy, Raw signal, Raw signal entropy | 70.8–66.4% | 67.6%|1.7 | 34.5–31.8 | 33.6|1.0 | 87.9–84.6 | 86.1|1.1 |
| QRS, Raw signal | 70.3–65.4% | 67.5%|1.9 | 34.3–30.4 | 32.9|1.5 | 83.3–82.3 | 82.7|0.3 |
| QRS, QRS entropy | 70.2–66.6% | 67.6%|1.5 | 37.0–31.7 | 34.1|2.0 | 87.0–84.7 | 85.7|0.9 |
| QRS, QRS entropy, Raw signal | 70.2–66.6% | 68.5%|1.3 | 34.7–33.1 | 34.1|0.6 | 86.4–83.2 | 85.3|1.2 |
| QRS, Raw signal entropy | 69.7–65.3% | 67.2%|1.6 | 36.3–31.3 | 33.9|2.0 | 86.8–84.1 | 85.2|1.1 |
| QRS, QRS entropy, Raw signal entropy | 69.6–66.5% | 67.5%|1.3 | 36.3–32.7 | 34.5|1.4 | 86.2–85.0 | 85.7|0.5 |
| QRS, Raw signal, Raw signal entropy | 69.6–66.6% | 68.2%|1.1 | 35.2–32.1 | 33.6|1.1 | 86.0–83.0 | 84.4|1.1 |
| QRS entropy, Raw signal, Raw signal entropy | 68.2–64.2% | 66.2%|1.5 | 30.6–27.7 | 29.6|1.2 | 82.9–81.6 | 82.2|0.6 |
| QRS | 68.2–66.2% | 67.1%|0.8 | 33.0–31.9 | 32.4|0.4 | 86.3–82.4 | 84.4|1.5 |
| Raw signal, Raw signal entropy | 66.3–63.0% | 64.3%|1.2 | 29.8–26.9 | 28.0|1.1 | 82.1–77.6 | 79.5|1.8 |
| QRS entropy, Raw signal | 66.2–63.4% | 65.1%|1.0 | 31.1–28.5 | 29.2|1.1 | 83.5–80.0 | 81.8|1.2 |
| QRS entropy, Raw signal entropy | 63.3–61.3% | 62.0%|0.8 | 28.2–26.5 | 27.6|0.7 | 84.7–82.9 | 83.8|0.7 |
| QRS entropy | 62.3–58.8% | 60.2%|1.4 | 25.7–22.2 | 23.9|1.5 | 82.8–80.5 | 82.0|0.9 |
| Raw signal | 62.0–59.9% | 61.3%|0.8 | 26.9–24.4 | 25.6|0.9 | 76.0–73.7 | 75.1|1.1 |
| Raw signal entropy | 59.1–55.9% | 57.2%|1.1 | 22.1–21.1 | 21.5|0.4 | 80.7–78.8 | 79.7|0.8 |