| Literature DB >> 35215531 |
Bikash K Pradhan1, Maciej Jarzębski2, Anna Gramza-Michałowska3, Kunal Pal1.
Abstract
The effect of coffee (caffeinated) on electro-cardiac activity is not yet sufficiently researched. In the current study, the occurrence of coffee-induced short-term changes in electrocardiogram (ECG) signals was examined. Further, a machine learning model that can efficiently detect coffee-induced alterations in cardiac activity is proposed. The ECG signals were decomposed using three different joint time-frequency decomposition methods: empirical mode decomposition, discrete wavelet transforms, and wavelet packet decomposition with varying decomposition parameters. Various statistical and entropy-based features were computed from the decomposed coefficients. The statistical significance of these features was computed using Wilcoxon's signed-rank (WSR) test for significance testing. The results of the WSR tests infer a significant change in many of these parameters after the consumption of coffee (caffeinated). Further, the analysis of the frequency bands of the decomposed coefficients reveals that most of the significant change was localized in the lower frequency band (<22.5 Hz). Herein, the performance of nine machine learning models is compared and a gradient-boosted tree classifier is proposed as the best model. The results suggest that the gradient-boosted tree (GBT) model that was developed using a db2 mother wavelet at level 2 decomposition shows the highest mean classification accuracy of 78%. The outcome of the current study will open up new possibilities in detecting the effects of drugs, various food products, and alcohol on cardiac functionality.Entities:
Keywords: ECG; caffeinated coffee; caffeine; machine learning; the short-term effect of coffee
Mesh:
Substances:
Year: 2022 PMID: 35215531 PMCID: PMC8875083 DOI: 10.3390/nu14040885
Source DB: PubMed Journal: Nutrients ISSN: 2072-6643 Impact factor: 5.717
Figure 1Overview of the proposed model.
Figure 2A schematic representation of the nodes from a 3-level DWT decomposition.
Figure 3Different nodes of the WPD tree (level-3) with their frequency range.
Figure 4List of features used in the current study.
Figure 5Typical IMFs of a 5 s ECG signal (a) before and (b) after consumption of coffee.
Figure 6List of features that showed a significant change in different IMFs (note: : a significant decrease in value post-consumption of coffee, : a significant increase in value post-consumption of coffee, no color: insignificant change in value post-consumption of coffee).
Classification performance of the best ML models generated from the EMD-based processing of the ECG signals at different decomposition levels.
| No. of IMFs | ML Model | Accuracy | Precision | F-Measure | Sensitivity | Specificity | AUC |
|---|---|---|---|---|---|---|---|
| 1 | DL | 56.11 ± 2.11 | 54.08 ± 1.59 | 65.21 ± 0.89 | 82.22 ± 2.48 | 30.00 ± 6.02 | 0.615 ± 0.055 |
| 2 | GBT | 53.61 ± 2.52 | 52.77 ± 1.91 | 59.25 ± 3.64 | 67.78 ± 7.24 | 39.44 ± 5.34 | 0.579 ± 0.019 |
| 3 | FLM | 53.89 ± 2.67 | 53.10 ± 2.26 | 59.69 ± 2.02 | 68.33 ± 4.21 | 39.44 ± 6.63 | 0.551 ± 0.041 |
| 4 | DL | 57.50 ± 2.32 | 57.12 ± 2.08 | 58.48 ± 3.01 | 60.00 ± 4.65 | 55.00 ± 3.04 | 0.587 ± 0.047 |
| 5 | DL | 53.06 ± 2.06 | 52.10 ± 1.39 | 61.84 ± 1.75 | 76.11 ± 3.17 | 30.00 ± 3.62 | 0.565 ± 0.050 |
| 6 | GBT | 53.61 ± 1.24 | 52.73 ± 1.04 | 60.66 ± 1.17 | 71.67 ± 5.34 | 35.56 ± 7.71 | 0.554 ± 0.024 |
NB: Color scale used in the table (column-wise): minimum valuemaximum value.
Figure 7Typical DWT coefficients after level-3 decomposition using db6 mother wavelet (a) before and (b) after the consumption of coffee.
Figure 8List of significant features in each frequency band (or coefficients) after a level-5 decomposition in the case of DWT (note: : a significant decrease in value post-consumption of coffee, : a significant increase in value post-consumption of coffee, no color: insignificant change in value).
Figure 9Percentage change in the mean values of the significant features obtained in the different frequency bands of the ECG signal after DWT decomposition.
Classification performance of the best ML models generated from the DWT-based processing of the ECG signals at different decomposition levels.
| Level | Wavelet Used | ML Model | Accuracy | Precision | F-Measure | Sensitivity | Specificity | AUC |
|---|---|---|---|---|---|---|---|---|
| 2 | db2 | GBT | 75.28 ± 0.62 | 88.55 ± 3.90 | 70.20 ± 1.31 | 58.33 ± 3.40 | 92.22 ± 3.62 | 0.830 ± 0.020 |
| db4 | GBT | 70.00 ± 2.11 | 67.00 ± 2.98 | 72.59 ± 1.50 | 79.44 ± 4.21 | 60.58 ± 6.63 | 0.794 ± 0.009 | |
| db6 | GBT | 78.33 ± 0.76 | 75.89 ± 2.01 | 79.31 ± 1.53 | 83.33 ± 5.20 | 73.33 ± 4.21 | 0.866 ± 0.029 | |
| db8 | GBT | 73.61 ± 0.98 | 74.61 ± 3.04 | 73.11 ± 2.55 | 72.22 ± 7.08 | 75.00 ± 6.21 | 0.807 ± 0.017 | |
| 3 | db2 | GBT | 72.50 ± 3.73 | 77.44 ± 2.19 | 69.54 ± 5.29 | 63.33 ± 7.71 | 81.67 ± 1.52 | 0.810 ± 0.048 |
| db4 | GBT | 76.94 ± 3.20 | 79.91 ± 4.60 | 75.83 ± 3.04 | 72.22 ± 2.78 | 81.67 ± 5.05 | 0.850 ± 0.041 | |
| db6 | GBT | 75.83 ± 3.49 | 75.18 ± 5.09 | 76.33 ± 2.90 | 77.78 ± 3.93 | 73.89 ± 7.24 | 0.839 ± 0.033 | |
| db8 | GBT | 73.06 ± 2.11 | 87.62 ± 3.76 | 66.56 ± 3.62 | 53.89 ± 5.05 | 92.22 ± 3.04 | 0.817 ± 0.030 | |
| 4 | db2 | GBT | 72.50 ± 3.73 | 77.44 ± 2.19 | 69.54 ± 5.29 | 63.33 ± 7.71 | 81.67 ± 1.52 | 0.810 ± 0.048 |
| db4 | GBT | 72.50 ± 3.85 | 82.28 ± 6.84 | 67.71 ± 4.67 | 57.78 ± 5.34 | 87.22 ± 6.09 | 0.817 ± 0.053 | |
| db6 | GBT | 69.72 ± 3.85 | 72.54 ± 4.77 | 67.65 ± 5.33 | 63.89 ± 8.56 | 75.56 ± 6.33 | 0.778 ± 0.034 | |
| db8 | DL | 64.44 ± 3.34 | 64.38 ± 3.66 | 64.62 ± 3.35 | 65.00 ± 4.65 | 63.89 ± 5.20 | 0.695 ± 0.051 | |
| 5 | db2 | GBT | 70.00 ± 1.58 | 71.65 ± 3.40 | 68.96 ± 1.24 | 66.67 ± 3.40 | 73.33 ± 5.41 | 0.771 ± 0.032 |
| db4 | GBT | 71.11 ± 0.62 | 74.18 ± 2.16 | 69.21 ± 1.05 | 65.00 ± 3.17 | 77.22 ± 3.62 | 0.773 ± 0.023 | |
| db6 | GBT | 68.89 ± 3.04 | 69.09 ± 2.53 | 68.60 ± 4.09 | 68.33 ± 6.69 | 69.44 ± 3.40 | 0.776 ± 0.041 | |
| db8 | GBT | 66.67 ± 2.41 | 68.15 ± 3.99 | 65.42 ± 3.16 | 63.33 ± 6.33 | 70.00 ± 6.63 | 0.752 ± 0.023 |
NB: Color scale used in the table (column-wise): minimum valuemaximum value.
Figure 10Typical WPD coefficients after level-3 decomposition using db6 mother wavelet (a) before and (b) after consumption of coffee.
Figure 11List of significant features in each frequency band (or coefficients) after a level-5 decomposition in the case of WPD (note: : a significant decrease in value post-consumption of coffee, : a significant increase in value post-consumption of coffee, no color: insignificant change in value post-consumption of coffee).
Figure 12Percentage change in the mean value of the significant feature in different frequency bands.
Classification performance of the best ML models generated from the WPD-based processing of the ECG signals at different decomposition levels.
| Level | Wavelet Used | ML Model | Accuracy | Precision | F-Measure | Sensitivity | Specificity | AUC |
|---|---|---|---|---|---|---|---|---|
| 2 | db2 | GBT | 71.11 ± 4.21 | 69.37 ± 3.76 | 72.22 ± 4.12 | 75.56 ± 4.56 | 66.67 ± 3.93 | 0.794 ± 0.053 |
| db4 | GBT | 69.17 ± 2.67 | 74.92 ± 3.85 | 65.15 ± 3.58 | 57.78 ± 4.56 | 80.56 ± 3.93 | 0.774 ± 0.032 | |
| db6 | GBT | 67.78 ± 5.93 | 70.59 ± 7.51 | 65.45 ± 6.62 | 61.11 ± 6.51 | 74.44 ± 6.63 | 0.715 ± 0.064 | |
| db8 | GBT | 71.67 ± 1.58 | 67.12 ± 1.35 | 74.99 ± 1.59 | 85.00 ± 3.17 | 58.33 ± 2.78 | 0.828 ± 0.025 | |
| 3 | db2 | GBT | 69.44 ± 1.96 | 88.39 ± 4.35 | 59.43 ± 4.02 | 45.00 ± 4.97 | 93.89 ± 3.04 | 0.787 ± 0.033 |
| db4 | GBT | 67.22 ± 2.88 | 84.19 ± 7.31 | 56.51 ± 4.69 | 42.78 ± 5.05 | 91.67 ± 4.38 | 0.769 ± 0.048 | |
| db6 | GBT | 69.44 ± 3.80 | 70.82 ± 5.09 | 68.63 ± 3.10 | 66.67 ± 1.96 | 72.22 ± 6.51 | 0.786 ± 0.050 | |
| db8 | GBT | 66.94 ± 4.75 | 65.92 ± 4.67 | 68.07 ± 4.55 | 70.56 ± 6.09 | 63.33 ± 6.63 | 0.733 ± 0.047 | |
| 4 | db2 | GBT | 73.33 ± 1.16 | 73.13 ± 3.02 | 73.50 ± 2.50 | 74.44 ± 7.45 | 72.27 ± 6.51 | 0.795 ± 0.046 |
| db4 | GBT | 66.11 ± 4.24 | 65.77 ± 4.01 | 66.39 ± 4.78 | 67.22 ± 6.92 | 65.00 ± 5.05 | 0.730 ± 0.027 | |
| db6 | GBT | 68.61 ± 3.75 | 76.72 ± 7.07 | 63.25 ± 3.69 | 53.89 ± 2.48 | 83.33 ± 5.89 | 0.724 ± 0.052 | |
| db8 | GBT | 62.22 ± 2.28 | 59.47 ± 1.99 | 67.15 ± 1.65 | 77.22 ± 3.04 | 47.22 ± 5.20 | 0.685 ± 0.033 | |
| 5 | db2 | GBT | 63.61 ± 2.48 | 67.50 ± 4.60 | 59.41 ± 2.53 | 53.33 ± 4.12 | 73.89 ± 6.39 | 0.698 ± 0.032 |
| db4 | DL | 64.17 ± 3.85 | 64.12 ± 4.01 | 64.27 ± 3.74 | 64.44 ± 3.62 | 63.89 ± 4.39 | 0.679 ± 0.050 | |
| db6 | GBT | 61.39 ± 4.33 | 70.25 ± 9.33 | 51.28 ± 4.35 | 40.56 ± 3.17 | 82.22 ± 7.24 | 0.696 ± 0.064 | |
| db8 | GBT | 63.06 ± 3.34 | 66.29 ± 2.54 | 58.48 ± 6.44 | 52.78 ± 9.42 | 73.33 ± 3.73 | 0.650 ± 0.054 |
NB: Color scale used in the table (column-wise): minimum valuemaximum value.
Classification performance of the best two ML models after feeding all extracted features in each decomposition method individually and simultaneously.
| Decomposition Method Used | ML Model | Accuracy | Precision | Recall | F-Measure | Sensitivity | Specificity | AUC |
|---|---|---|---|---|---|---|---|---|
| EMD | DL | 56.9 ± 2.2 | 57.2 ± 2.9 | 56.7 ± 4.6 | 56.8 ± 2.2 | 56.7 ± 4.6 | 57.2 ± 6.7 | 0.576 ± 0.038 |
| GLM | 53.6 ± 2.1 | 52.8 ± 1.5 | 67.8 ± 5.0 | 59.3 ± 2.7 | 67.8 ± 5.0 | 39.4 ± 3.6 | 0.573 ± 0.021 | |
| DWT | GBT | 76.9 ± 2.7 | 84.5 ± 2.6 | 66.1 ± 6.0 | 74.0 ± 3.8 | 66.1 ± 6.0 | 87.8 ± 2.5 | 0.859 ± 0.041 |
| DL | 70.6 ± 2.7 | 69.6 ± 3.4 | 73.3 ± 1.5 | 71.4 ± 2.0 | 73.3 ± 1.5 | 67.8 ± 5.0 | 0.800 ± 0.035 | |
| WPD | DL | 68.3 ± 6.1 | 69.5 ± 6.9 | 65.6 ± 5.4 | 67.5 ± 6.1 | 65.6 ± 5.4 | 71.1 ± 7.0 | 0.759 ± 0.049 |
| GBT | 66.9 ± 3.6 | 68.7 ± 3.9 | 62.8 ± 9.3 | 65.3 ± 5.2 | 62.8 ± 9.3 | 71.1 ± 6.4 | 0.767 ± 0.043 | |
| EMD + DWT + WPD | GBT | 69.7 ± 4.9 | 66.3 ± 3.9 | 80.0 ± 6.6 | 72.5 ± 4.8 | 80.0 ± 6.6 | 59.4 ± 4.6 | 0.790 ± 0.045 |
| DL | 68.9 ± 2.9 | 71.1 ± 3.5 | 63.9 ± 5.9 | 67.2 ± 3.7 | 63.9 ± 5.9 | 73.9 ± 4.6 | 0.775 ± 0.027 |
Comparison of the various studies on the detection/classification of coffee/caffeine-induced changes in the cardiac autonomic and electrocardiographic parameters.
| Problem | Methods | Parameters/Features | Results/Observation | Reference |
|---|---|---|---|---|
| Coffee/caffeine-induced changes in the cardiac autonomic function | HRV analysis | Time–domain parameters: RMSSD, SDNN, pNN50, mean RRI | A reduced trend in the HRV vagal indexes was observed for people who consumed ≥3 cups of coffee/day | [ |
| HRV analysis | Vagal parameters: heart rate, blood pressure | Lower HR, higher blood pressure, a significant rise in HF power, | [ | |
| HRV analysis | Nonlinear parameters: correlation dimension, approximate entropy, detrend fluctuation parameters | Coffee and cola showed no significant effect on the nonlinear parameter of the HRV | [ | |
| ECG morphology-based statistical analysis | Electrocardiographic parameters: R-peak, P-wave, and T-wave | No significant increase in the amplitude of R-peak, decrease in the value of P- and T-peaks | [ | |
| ECG morphology-based statistical analysis | Vagal parameters: heart rate, blood pressure. | No changes in the diastolic blood pressure, | [ | |
| ECG morphology-based statistical analysis | Electrocardiographic parameters: mean RR interval, QTc interval | No significant prolongation in the QTc interval, a significant decrease in the heart rate | [ | |
| ECG morphology-based statistical analysis | Vagal parameters: blood pressure, heart rate. | No significant change in any parameter after having the energy drink | [ | |
| ECG morphology-based statistical analysis | Vagal Parameters and ECG morphological parameters | Increased blood pressure (systolic and diastolic) and prolonged QTc interval | [ | |
| ECG morphology-based statistical analysis | Vagal parameters: blood pressure, heart rate | An increase in systolic blood pressure, | [ | |
| ECG morphology-based statistical analysis | Vagal parameters: systolic and diastolic blood pressure | Increased heart rate, blood pressure (systolic and diastolic), and QT interval | [ | |
| ECG morphology-based statistical analysis | Vagal parameters: blood pressure, heart rate | Prolonged QTc interval and increased blood pressure (systolic and diastolic). | [ | |
| Decomposition based analysis (DWT and WPD) | Statistical and entropy features | Increase in the variance and entropy-features, the changes are mostly reflected in the lower frequency range in the ECG signal (<22.5 Hz) | Proposed Study | |
| Automatic detection of the coffee-induced changes in the ECG signals | ECG segment based statistical analysis | Statistical and entropy features | Accuracy: 75% (random forest classifier) | [ |
| ECG signal decomposition-based statistical analyses. | Statistical and entropy features | Accuracy: 78% (gradient-boosted tree classifier) | Proposed Study |