| Literature DB >> 35011934 |
Cheng-Yu Lin1,2,3, Yi-Wen Wang4, Febryan Setiawan4, Nguyen Thi Hoang Trang4, Che-Wei Lin4,5,6.
Abstract
BACKGROUND: Heart rate variability (HRV) and electrocardiogram (ECG)-derived respiration (EDR) have been used to detect sleep apnea (SA) for decades. The present study proposes an SA-detection algorithm using a machine-learning framework and bag-of-features (BoF) derived from an ECG spectrogram.Entities:
Keywords: bag-of-features; ensemble learning; k-nearest neighbor algorithm; sleep apnea; support vector machine; time–frequency transformation
Year: 2021 PMID: 35011934 PMCID: PMC8745785 DOI: 10.3390/jcm11010192
Source DB: PubMed Journal: J Clin Med ISSN: 2077-0383 Impact factor: 4.241
General apnea group subject patterns for the proposed frequency bands.
| Frequency Band | Normal Breathing Data * | Apnea Data * | ||||
|---|---|---|---|---|---|---|
| APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | |
| 0.1–50 Hz | 4990/1778 | 11,236/4883 | 16,941/8383 | 1638/1799 | 5173/5886 | 5538/5895 |
| 8–50 Hz | 4990/1819 | 11,236/4985 | 16,941/8665 | 1638/1820 | 5173/5902 | 5538/5908 |
| 0.8–10 Hz | 4990/1776 | 11,236/4803 | 16,941/8568 | 1638/1802 | 5173/5775 | 5538/5778 |
| 0–0.8 Hz | 4990/1804 | 11,236/5060 | 16,941/8526 | 1638/1801 | 5173/5931 | 5538/5993 |
* Data are given in order: algorithm performance evaluation databases NCKUHSCAD/PAED. The number before “/” is for the NCKUHSCAD dataset, and the number after “/” is for the PAED dataset.
Figure 1Proposed sleep apnea detection algorithm using machine learning framework and bag -of-features derived from ECG spectrograms (SVM: Support Vector Machine; KNN: k-nearest neighbor).
Figure 2Airflow, electrocardiogram (ECG), and ECG spectrograms from apnea to non-apnea, followed by apnea again.
Figure 3Spectrograms of different frequency bands (0.01–0.1, 0.1–0.4, 0.5–50, 8–50, 0.8–10, and 0–0.8 Hz) [17,18,25] for (a) normal ECG and (b) apnea ECG events.
Figure 4Codebook and feature vector generation for the proposed bag-of-features method.
Figure 5Key points extracted from an ECG spectrogram of normal breathing for a 60 s window and 8–50 Hz band.
Figure 6Key points extracted from the sleep apnea ECG spectrogram for a 60 s window and 8–50 Hz band.
Confusion matrix and evaluation parameter equations.
| Confusion Matrix | Actual Class |
|
| ||
| A | B | ||||
| Predicted Class | A | TP | FP | ||
| B | FN | TN |
| ||
| Total | P | N | |||
Note: A = condition positive set; B = condition negative set; TP = true positive; FP = false positive; FN = false negative; TN = true negative; P = TP + FN; N = FP + TN.
Nested five-fold cross-validation training and validation performance using a 60 s time window based on 8~50 Hz frequency range and SVM classifier of PAED and NCKUHSCAD.
| Database | Accuracy (%) | Sensitivity (%) | Specificity (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | |
| PAED | 87.35 | 88.06 | 90.43 | 89.70 | 90.40 | 88.72 | 85.01 | 85.32 | 91.55 |
| NCKUHSCAD | 83.40 | 80.15 | 83.54 | 56.78 | 63.48 | 57.17 | 92.14 | 87.82 | 92.16 |
Five-fold cross-validation classification performance using a 60 s time window for NCKUHSCAD.
| Frequency Band | Accuracy (%) | Sensitivity (%) | Specificity (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | |
| SVM | |||||||||
| 0.1–50 Hz | 81.6 | 77.7 | 81 | 50.2 | 45.4 | 32.4 | 91.9 | 92.5 | 96.9 |
| 8–50 Hz | 84.4 # | 80.5 | 83.8 # | 57.3 | 60.6 | 51.6 | 93.3 | 89.6 | 94.3 |
| 0.8–10 Hz | 83.3 | 79.6 | 82.6 | 53.8 | 56.6 | 42.9 | 93 | 90.1 | 95.5 |
| 0–0.8 Hz | 79.9 | 70.9 | 76.8 | 18.9 | 22 | 6 | 100 | 93.4 | 100 |
| KNN | |||||||||
| 0.1–50 Hz | 81 | 77.8 | 81.6 | 49.6 | 57 | 47.1 | 91.3 | 87.3 | 92.8 |
| 8–50 Hz | 83.6 | 79.3 | 82.6 | 56.7 | 62.5 | 54.6 | 92.4 | 87.1 | 91.7 |
| 0.8–10 Hz | 82.7 | 78 | 81.3 | 52.4 | 53.7 | 44.6 | 92.6 | 89.1 | 93.4 |
| 0–0.8 Hz | 78.8 | 69.9 | 76.3 | 29.6 | 11.4 | 9 | 95 | 96.8 | 98.2 |
| EL | |||||||||
| 0.1–50 Hz | 82.2 | 78.4 | 82.5 | 60.2 | 61.1 | 52.2 | 89.4 | 86.3 | 92.4 |
| 8–50 Hz | 84 | 80.8 # | 83.7 | 63.7 | 70.6 | 65.3 | 90.6 | 85.5 | 89.7 |
| 0.8–10 Hz | 82.5 | 78.6 | 82 | 60.5 | 60.8 | 48.8 | 89.7 | 86.8 | 92.9 |
| 0–0.8 Hz | 78.8 | 70.8 | 76.6 | 41.1 | 36.5 | 20.5 | 91.2 | 86.6 | 95 |
Note: # denotes the highest accuracy in APEG-A/APEG-B/APEG-C.
Five-fold cross-validation classification performance using a 60 s time window for PAED.
| Frequency Band | Accuracy (%) | Sensitivity (%) | Specificity (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | |
| SVM | |||||||||
| 0.1–50 Hz | 77.2 | 82.8 | 86.5 | 78.8 | 81.3 | 79.1 | 75.5 | 84.5 | 91.3 |
| 8–50 Hz | 88.2 # | 88.3 | 90.9 | 90.1 | 90.7 | 89.1 | 86.3 | 85.6 | 92.1 |
| 0.8–10 Hz | 88.2 | 87.8 | 90.1 | 89.8 | 90.9 | 87.2 | 86.7 | 84.2 | 92.1 |
| 0–0.8 Hz | 65.7 | 68.0 | 71.4 | 63.5 | 73.4 | 52.4 | 68.0 | 61.7 | 83.8 |
| KNN | |||||||||
| 0.1–50 Hz | 75.2 | 81.5 | 84.9 | 66.8 | 77.2 | 72.2 | 83.5 | 86.4 | 93.3 |
| 8–50 Hz | 86.1 | 86.5 | 89.5 | 82.3 | 85.4 | 82.6 | 90.0 | 87.7 | 94.0 |
| 0.8–10 Hz | 88.0 | 86.1 | 88.5 | 84.3 | 83.6 | 79.7 | 91.8 | 89.1 | 94.3 |
| 0–0.8 Hz | 59.3 | 62.5 | 66.0 | 52.1 | 62.1 | 35.0 | 66.5 | 62.9 | 86.5 |
| EL | |||||||||
| 0.1–50 Hz | 75.7 | 81.8 | 85.6 | 71.1 | 81.9 | 78.0 | 80.2 | 81.8 | 90.7 |
| 8–50 Hz | 86.9 | 88.3 # | 91.4 # | 88.9 | 90.7 | 89.8 | 84.8 | 85.5 | 92.4 |
| 0.8–10 Hz | 87.2 | 86.5 | 89.1 | 87.8 | 88.6 | 85.5 | 86.5 | 84.0 | 91.4 |
| 0–0.8 Hz | 65.2 | 69.5 | 69.5 | 64.7 | 45.9 | 45.9 | 65.8 | 85.1 | 85.1 |
Note: # denotes the highest accuracy in APEG-A/APEG-B/APEG-C.
Five-fold cross-validation classification performance using a 10 s time window for NCKUHSCAD.
| Frequency Band | Accuracy (%) | Sensitivity (%) | Specificity (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | |
| SVM | |||||||||
| 0.1–50 Hz | 92.7 | 93.2 | 93.9 | 79.4 | 80.4 | 77.4 | 97 | 97.4 | 97.5 |
| 8–50 Hz | 95 # | 93.3 # | 94.9 # | 84.3 | 79.2 | 77.7 | 98.5 | 97.8 | 98.6 |
| 0.8–10 Hz | 80.1 | 81.5 | 85.9 | 38 | 40.3 | 37.3 | 93.8 | 94.8 | 96.5 |
| KNN | |||||||||
| 0.1–50 Hz | 81.7 | 84.2 | 87.3 | 45.8 | 53.5 | 45.5 | 93.4 | 94 | 96.5 |
| 8–50 Hz | 87.1 | 85.1 | 88.2 | 59.2 | 52.4 | 47.3 | 96.3 | 95.6 | 97.1 |
| 0.8–10 Hz | 76.8 | 79 | 84.2 | 10.8 | 36 | 28.8 | 98.3 | 92.9 | 96.2 |
| EL | |||||||||
| 0.1–50 Hz | 91.3 | 91.9 | 92.8 | 70.5 | 73.3 | 64.1 | 98 | 97.9 | 99 |
| 8–50 Hz | 94 | 91.8 | 93.3 | 79.6 | 78.4 | 66.8 | 98.7 | 96.1 | 99.1 |
| 0.8–10 Hz | 79.3 | 80.8 | 85.3 | 29.6 | 35.3 | 29.1 | 95.5 | 95.4 | 97.5 |
Note: # denotes the highest accuracy in APEG-A/APEG-B/APEG-C.
The REM and Non-REM classification performance using a PAED 60 s time window based on 8~50 Hz frequency range and SVM classifier.
| Sleep Stage | Accuracy (%) | Sensitivity (%) | Specificity (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | APEG-A | APEG-B | APEG-C | |
| Imbalanced Dataset | |||||||||
| REM | 83.1 | 78.7 | 75 | 90.5 | 78.5 | 84.7 | 61.3 | 78.8 | 59.1 |
| Non-REM | 74.8 | 81.4 | 77.8 | 72.3 | 81.6 | 78.7 | 77.1 | 81.1 | 77 |
| Balanced Dataset | |||||||||
| REM | 89.6 | 78.7 | 83.4 | 90 | 78.5 | 85.3 | 89.2 | 78.8 | 81.5 |
| Non-REM | 75.5 | 86.6 | 79.1 | 74.5 | 86.8 | 80.8 | 76.4 | 86.4 | 77.5 |
Leave-one-subject-out cross-validation classification performance using a PAED-APEG-A 60 s time window based on 8~50 Hz frequency range and SVM classifier.
| Evaluation | APEG-A Subject | Average | |||||||
|---|---|---|---|---|---|---|---|---|---|
| a03 | a05 | a08 | a13 | a16 | a17 | a19 | a20 | ||
| Accuracy | 75.0 | 54.3 | 76.5 | 85.2 | 73.3 | 67.2 | 80.2 | 52.1 | 70.48 |
| Sensitivity | 98.6 | 70.1 | 57.8 | 77.4 | 68.4 | 95.7 | 66.5 | 26.4 | 70.11 |
| Specificity | 54.7 | 32.4 | 88.4 | 92.7 | 83.1 | 49.5 | 88.8 | 93.0 | 72.83 |
Leave-one-subject-out cross-validation classification performance using a PAED-APEG-B 60 s time window based on 8~50 Hz frequency range and SVM classifier.
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| Accuracy | 92.35 | 20.83 | 84.17 | 58.54 | 81.90 | 65.42 | 72.71 | 75.83 | 83.75 | 77.08 | 65.95 | 52.08 | 81.46 |
| Sensitivity | 100 | 0.26 | 93.24 | 56.69 | 91.80 | 28.96 | 85.37 | 59.36 | 86.89 | 87.95 | 32.97 | 52.85 | 65.11 |
| Specificity | 21.05 | 100 | 76.36 | 79.49 | 68.18 | 87.88 | 52.69 | 86.35 | 73.68 | 74.81 | 91.18 | 43.90 | 97.14 |
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
| |||
| Accuracy | 81.88 | 75 | 76.04 | 78.06 | 84.38 | 84.79 | 73.13 | 90.63 | 47.92 | 63.57 | 28.81 | 70.68 | |
| Sensitivity | 99.74 | 80.62 | 72.50 | 93.48 | 89.04 | 68.11 | 65.08 | 10.53 | 88.17 | 84.62 | 90.0 | 70.14 | |
| Specificity | 11.34 | 58.87 | 83.13 | 68.47 | 45.10 | 95.25 | 85.95 | 93.93 | 38.24 | 59.72 | 27.32 | 67.50 | |
Leave-one-subject-out cross-validation classification performance using a PAED-APEG-C 60 s time window based on 8~50 Hz frequency range and SVM classifier.
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| Accuracy | 89.80 | 21.46 | 83.96 | 69.17 | 76.90 | 64.58 | 70.83 | 78.54 | 79.58 | 76.25 | 57.38 | 44.79 | 81.25 |
| Sensitivity | 94.92 | 1.0 | 77.48 | 67.80 | 77.05 | 16.39 | 85.71 | 61.50 | 78.69 | 79.52 | 2.75 | 43.96 | 65.96 |
| Specificity | 42.11 | 100 | 89.53 | 84.62 | 76.70 | 94.28 | 47.31 | 89.42 | 82.46 | 75.57 | 99.16 | 53.66 | 95.92 |
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| Accuracy | 81.46 | 73.96 | 73.33 | 78.61 | 88.75 | 78.96 | 56.25 | 93.96 | 63.54 | 72.38 | 41.67 | 98.54 | 91.90 |
| Sensitivity | 98.43 | 78.93 | 70.31 | 65.94 | 92.31 | 57.84 | 38.98 | 0 | 74.19 | 70.77 | 50.0 | 0 | 0 |
| Specificity | 14.43 | 59.68 | 79.38 | 86.49 | 58.82 | 92.20 | 83.78 | 97.83 | 60.98 | 72.68 | 41.46 | 98.75 | 92.12 |
|
|
|
| |||||||||||
|
|
|
| |||||||||||
| Accuracy | 95.48 | 90.71 | 47.86 | 73.17 | |||||||||
| Sensitivity | 25.0 | 0 | 0 | 50.88 | |||||||||
| Specificity | 96.15 | 91.15 | 47.97 | 76.02 | |||||||||
Proposed algorithm comparison with current best-practice algorithms.
| Author (Year) | Database (Population) | Time-Window Length | Method | Accuracy (%) | Sensitivity (%) | Specificity (%) |
|---|---|---|---|---|---|---|
| Lin et al. (this paper) | Physionet Apnea-ECG | 1 min | CWT + SVM/KNN/EL | 91.4 | 89.8 | 92.4 |
| Quinceno-Manrique et al. [ | Physionet Apnea-ECG | 3 min | SPWVD + PCA + KNN | 89.02 | Not mentioned | Not mentioned |
| Nguyen et al. [ | Physionet Apnea-ECG | 1 min | RQA + greedy forward feature selection + SVM and neural network | 85.26 | 86.37 | 83.47 |
| Sannino et al. [ | Physionet Apnea-ECG | 1 min | Frequency domain, time domain, and non-linear parameters + DEREx | 85.76 | 65.82 | 66.03 |
| Varon et al. [ | Physionet Apnea-ECG | 1 min | EDR (Ramp/PCA/kPCA) + LS-SVM | 84.74 | 84.71 | 84.69 |
| Hassan [ | Physionet Apnea-ECG | 1 min | TQWT + NIG + AdaBoost | 87.33 | 81.99 | 90.72 |
| Surrel et al. [ | Physionet Apnea-ECG | 1 min | Apnea scoring (energy) + SVM | 85.70 | 81.40 | 88.40 |
| Singh et al. [ | Physionet Apnea-ECG | 1 min | CWT + AlexNet CNN + Decision Fusion (SVM, KNN, Ensemble, LDA) | 86.22 | 90 | 83.8 |
Note: CWT: continuous wavelet transform; SVM: support vector machine; KNN: k-nearest neighbor; EL: ensemble learning; TQWT: tunable-Q factor wavelet transform; NIG: normal inverse gaussian; AdaBoost: adaptive boosting; SPWVD: smoothed pseudo Wigner–Ville distribution; PCA: principal component analysis; RQA: Recurrence Quantification Analysis; DEREx: Differential Evolution-based Rule Extractor; EDR: ECG derived respiration; Ramp: R-peak amplitude; kPCA: kernel principal component analysis; LS-SVM: least-squares support vector machine. * The APEG-C classification result was chosen because this dataset was comparable with the existing literature, consisting of the whole PhysioNet database (Groups A, B, and C).