Lying position classification based on ECG waveform and random forest during sleep in healthy people

Hongze Pan, Zhi Xu, Hong Yan, Yue Gao, Zhanghuang Chen, Jinzhong Song, Yu Zhang, Hongze Pan, Zhi Xu, Hong Yan, Yue Gao, Zhanghuang Chen, Jinzhong Song, Yu Zhang

Abstract

Background: Several different lying positions, such as lying on the left side, supine, lying on the right side and prone position, existed when healthy people fell asleep. This article explored the influence of lying positions on the shape of ECG (electrocardiograph) waveform during sleep, and then lying position classification based on ECG waveform features and random forest was achieved.

Methods: By means of de-noising the overnight sleep ECG data from ISRUC website dataset, as well as extracting the waveform features, we calculated a total of 30 ECG waveform features, including 2 newly proposed features, S/R and ∠QSR. The means and significant difference level of these features within different lying positions were calculated, respectively. Then 12 features were selected for three kinds of classification schemes.

Results: The lying positions had comparatively less effect on time-limit features. QT interval and RR interval were significantly lower than that in supine ([Formula: see text]). Significant differences appeared in most of the amplitude and double-direction features. When lying on the left side, the height of P wave and T wave, QRS area and T area, the QR potential difference and ∠QSR were significantly lower than those in supine ([Formula: see text]). However, S/R was significantly greater on left than those in supine ([Formula: see text]) and on right ([Formula: see text]). The height of T wave and area under T wave were significantly higher in supine than those on right ([Formula: see text]). For the subject specific classifier, a mean accuracy of 97.17% with Cohen's kappa statistic κ of 0.91, and AUC > 0.97 were achieved. While the accuracy and κ dropped to 63.87% and 0.32, AUC > 0.66, respectively when the subject independent classifier was considered.

Conclusions: When subjects were lying on the left side during sleep, due to the effect of gravity on heart, the position of heart changed, for example, turned and rotated, causing changes in the vectorcardiogram of frontal plane and horizontal plane, which lead to a change in ECG. When lying on the right side, the heart was upheld by the mediastinum, so that the degree of freedom was poor, and the ECG waveform was almost unchanged. The proposed method could be used as a technique for convenient lying position classification.

Keywords: Classification; ECG waveform; Lying position; Random forest; Sleep.

Figures

Fig. 1
Fig. 1
The workflow of this study
Fig. 2
Fig. 2
The results after signal preprocessing and character points detection. From left to right, there are P wave origin, P wave peak, P wave end, Q wave peak, R wave peak, S wave peak, T wave origin, T wave peak, T wave end. This part of ECG signal was from No.1 subject, which appeared from 5 h 40 min 11 s 505 ms to 5 h 40 min 13 s 355 ms
Fig. 3
Fig. 3
QRS complex area and T wave area calculation
Fig. 4
Fig. 4
ECG waveform in 3 lying positions, all from the No.1 subject in the database. Left: from 4 h 3 min 26 s 305 ms to 4 h 3 min 28 s 155 ms. Supine: from 6 h 31 min 47 s 405 ms to 6 h 31 min 49 s 255 ms. Right: from 2 h 18 min 33 s 655 ms to 2 h 18 min 35 s 505 ms
Fig. 5
Fig. 5
the workflow of classification method in 3 classification schemes
Fig. 6
Fig. 6
The classifier performance of three schemes. Graphs (ac) are the ROC curves of three kinds of lying position. The red line represents subject specific scheme, green line represents subject independent scheme without features normalization and blue line represents subject independent scheme with features normalization. Bar charts (df) present the mean value of AUC, Sensitivity, Specificity and F1-scores of 10 experiments
Fig. 7
Fig. 7
In order to verify the absence of overfitting, the learning curve are shown above. The blue line and red line represent the accuracy and Cohen’ K, respectively, of the classification result based on random forest with different proportion of training data
Fig. 8
Fig. 8
The comparison of the classification performance between RF, SVM and ANN. We can see that RM and ANN perform better than SVM, and the accuracies of RF and ANN are close. The Cohen’ k of ANN is slightly higher than RF. However, the calculation of RF is much faster. Consequently, RF performs best in general
Fig. 9
Fig. 9
The formation of VCG (vectorcardiogram)
Fig. 10
Fig. 10
The relation between VCG and ECG

References

    1. Adams MG, Drew BJ. Body position effects on the ECG: implication for ischemia monitoring. J Electrocardiol. 1997;30(4):285–291. doi: 10.1016/S0022-0736(97)80040-4.
    1. Shinar Z, Baharav A, Akselrod S. R wave duration as a measure of body position changes during sleep. Comput Cardiol. 1999;26:49–52.
    1. Shiner Z, Baharav A, Akselrod S. Detection of different recumbent body positions from the electrocardiogram. Med Biol Eng Comput. 2003;41(2):206–210. doi: 10.1007/BF02344890.
    1. Batchvarov V N, Bortolan G, Christov I I. Effect of heart rate and body position on the complexity of the QRS and T wave in healthy subjects. In: computers in cardiology. New Jersey: IEEE; 2008. p. 225–8.
    1. Smit D, Cock CCD, Thijs A, et al. Effects of breath-holding position on the QRS amplitudes in the routine electrocardiogram. J Electrocardiol. 2009;42(5):400. doi: 10.1016/j.jelectrocard.2009.04.006.
    1. Khalighi S, Sousa T, Santos JM, et al. ISRUC-Sleep: a comprehensive public dataset for sleep researchers. Comput Methods Programs Biomed. 2016;124:180–192. doi: 10.1016/j.cmpb.2015.10.013.
    1. Yang X, Yan H, Ren Z, Chen J. Survey of ECG based for human identification. Chin J Sci Instrum. 2010;31:541–545.
    1. Song J, Yan H, Li L, et al. A squeeze approach for electrocardiogram ST-segment detection based on R-wave and T-wave. Sheng Wu Yi Xue Gong Cheng Xue Za Zhi. 2011;28(5):855–859.
    1. Breiman L. Random forests. Mach Learn. 2001;45:5–32. doi: 10.1023/A:1010933404324.
    1. Faletra FF, Pandian NG, Ho SY. Location of the heart: body planes and axis. Anat Heart Multislice Comput Tomogr. 2009.
    1. Mincholé A, Sörnmo L, Laguna P. ECG-based detection of body position changes using a Laplacian noise model. Conf Proc IEEE Eng Med Biol Soc. 2011;2011(4):6931–6934.
    1. Li H, Yao F. The influence of body position change on electrocardiogram. J Med Front. 2016;6(29):136.
    1. Ng J, Sahakian A V, Swiryn S, et al. The effect of body position on P-wave axis. Heart Lung Circ. 2001;28.
    1. Mase K, Noguchi T, Tagami M, et al. Compression of the lungs by the heart in supine, side-lying, semi-prone positions. J Phys Ther Sci. 2016;28(9):2470–2473. doi: 10.1589/jpts.28.2470.
    1. Albert RK, Hubmayr RD. The prone position eliminates compression of the lungs by the heart. Am J Respir Crit Care Med. 2000;161(5):1660–1665. doi: 10.1164/ajrccm.161.5.9901037.
    1. Ball WS, Wicks JD, Jr MF. Prone-supine change in organ position: CT demonstration. AJR Am J Roentgenol. 1980;135(4):815–820. doi: 10.2214/ajr.135.4.815.
    1. Kutbay Özçelik H, Bayram M, Doğanay E, et al. Effects of body position on sleep architecture and quality in subsyndromal adults without apparent obstructive sleep apnea. Sleep Biol Rhythms. 2015;13(3):279–286. doi: 10.1111/sbr.12116.
    1. George CF, Millar TW, Kryger MH. Sleep apnea and body position during sleep. Sleep. 1988;11(1):90–99. doi: 10.1093/sleep/11.1.90.
    1. García, J, Astrom, M, Laguna P, et al. Detection of body position changes on the surface ECG. In: Computers in cardiology. New Jersey: IEEE; 2003. p. 45–8.
    1. García J, Aström M, Mendive J, et al. ECG-based detection of body position changes in ischemia monitoring. IEEE Trans Bio Med Eng. 2003;50(6):677. doi: 10.1109/TBME.2003.812208.
    1. Beattie ZT, Hagen CC, Hayes TL. Classification of lying position using load cells under the bed. In: International conference of the IEEE engineering in medicine and biology society. New Jersey: IEEE; 2011. p. 474–7.
    1. Mlynczak M, Berka M, Niewiadomski W, et al. Body position classification for cardiorespiratory measurement. In: Engineering in Medicine and Biology Society. New Jersey: IEEE; 2016. p. 3515.
    1. Grimm T, Martinez M, Benz A, et al. Sleep position classification from a depth camera using Bed Aligned Maps. In: International conference on pattern recognition. New Jersey: IEEE; 2017. p. 319–24.

Source: PubMed

3
Abonnieren