Predicting Sleep Quality through Biofeedback: A Machine Learning Approach Using Heart Rate Variability and Skin Temperature
Abstract
:1. Introduction
2. Results
2.1. Experimental Design
2.2. Machine Learning Accurately Classifies Sleep Quality Using HRV and Skin Temperature
2.3. HRV Metrics Are Useful for Discriminating between Good and Poor Sleep Quality
2.4. Specific IRT Features Are Representative of Good and Poor Sleep Quality
3. Discussion
3.1. HRV Metrics and Sleep Quality
3.2. Skin Temperature Measured by IRT and Sleep Quality
3.3. Practical Implications
3.4. Strengths and Limitations
3.5. Important Remarks
- (i)
- Accuracy of Classification: The overall accuracy of the metrics for classifying sleep conditions was 76.7% for HRV metrics, 73.3% for thermal features, and 83.3% for combined HRV and thermal information.
- (ii)
- Feature Importance: Key HRV metrics such as LF, LF/HF, and HF were identified as significant contributors to the classification performance.
- (iii)
- Poincaré Plot Analysis: Significant differences in the SD2/SD1 ratio were observed between good and poor sleepers, indicating its potential as a reliable indicator of sleep quality.
- (iv)
- Receiver Operating Characteristic (ROC) Curve: The ROC curve analysis for the combined model yielded an area under the curve (AUC) of 0.88, indicating high discriminative ability.
- (v)
- Cost-Effectiveness: The study highlighted the affordability of implementing the proposed solution using wearable sensors and low-cost thermal cameras, emphasizing its practical applicability in real-world settings.
4. Materials and Methods
4.1. Experimental Procedure and Data Acquisition
4.2. Data Preprocessing
4.3. Statistical Analysis
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Mendonça, F.; Mostafa, S.S.; Morgado-Dias, F.; Ravelo-García, A.G.; Penzel, T. A Review of Approaches for Sleep Quality Analysis. IEEE Access 2019, 7, 24527–24546. [Google Scholar] [CrossRef]
- Batrakoulis, A.; Veiga, O.L.; Franco, S.; Thomas, E.; Alexopoulos, A.; Valcarce-Torrente, M.; Santos-Rocha, R.; Ramalho, F.; Di Credico, A.; Vitucci, D.; et al. Health and Fitness Trends in Southern Europe for 2023: A Cross-Sectional Survey. AIMSPH 2023, 10, 378–408. [Google Scholar] [CrossRef] [PubMed]
- Young, T.; Peppard, P.E.; Gottlieb, D.J. Epidemiology of Obstructive Sleep Apnea. Am. J. Respir. Crit. Care Med. 2002, 165, 1217–1239. [Google Scholar] [CrossRef]
- Hafner, M.; Stepanek, M.; Taylor, J.; Troxel, W.M.; van Stolk, C. Why Sleep Matters—The Economic Costs of Insufficient Sleep. Rand Health Q. 2017, 6, 11. [Google Scholar] [PubMed]
- Waller, K.L.; Mortensen, E.L.; Avlund, K.; Osler, M.; Fagerlund, B.; Lauritzen, M.; Jennum, P. Subjective Sleep Quality and Daytime Sleepiness in Late Midlife and Their Association with Age-Related Changes in Cognition. Sleep Med. 2016, 17, 165–173. [Google Scholar] [CrossRef] [PubMed]
- Natale, V.; Léger, D.; Bayon, V.; Erbacci, A.; Tonetti, L.; Fabbri, M.; Martoni, M. The Consensus Sleep Diary: Quantitative Criteria for Primary Insomnia Diagnosis. Psychosom. Med. 2015, 77, 413. [Google Scholar] [CrossRef] [PubMed]
- Thorndike, F.P.; Ritterband, L.M.; Saylor, D.K.; Magee, J.C.; Gonder-Frederick, L.A.; Morin, C.M. Validation of the Insomnia Severity Index as a Web-Based Measure. Behav. Sleep Med. 2011, 9, 216–223. [Google Scholar] [CrossRef]
- Buysse, D.J.; Reynolds III, C.F.; Monk, T.H.; Berman, S.R.; Kupfer, D.J. The Pittsburgh Sleep Quality Index: A New Instrument for Psychiatric Practice and Research. Psychiatry Res. 1989, 28, 193–213. [Google Scholar] [CrossRef]
- Fabbri, M.; Beracci, A.; Martoni, M.; Meneo, D.; Tonetti, L.; Natale, V. Measuring Subjective Sleep Quality: A Review. Int. J. Environ. Res. Public Health 2021, 18, 1082. [Google Scholar] [CrossRef]
- De Fazio, R.; Mattei, V.; Al-Naami, B.; De Vittorio, M.; Visconti, P. Methodologies and Wearable Devices to Monitor Biophysical Parameters Related to Sleep Dysfunctions: An Overview. Micromachines 2022, 13, 1335. [Google Scholar] [CrossRef]
- Menghini, L.; Balducci, C.; De Zambotti, M. Is It Time to Include Wearable Sleep Trackers in the Applied Psychologists’ Toolbox? Span. J. Psychol. 2024, 27, e8. [Google Scholar] [CrossRef]
- Cheng, W.; Chen, H.; Tian, L.; Ma, Z.; Cui, X. Heart Rate Variability in Different Sleep Stages Is Associated with Metabolic Function and Glycemic Control in Type 2 Diabetes Mellitus. Front. Physiol. 2023, 14, 1157270. [Google Scholar] [CrossRef] [PubMed]
- Gouin, J.; Wenzel, K.; Deschenes, S.; Dang-Vu, T. Heart Rate Variability Predicts Sleep Efficiency. Sleep Med. 2013, 14, e142. [Google Scholar] [CrossRef]
- van den Berg, J.; Neely, G.; Wiklund, U.; Landström, U. Heart Rate Variability during Sedentary Work and Sleep in Normal and Sleep-deprived States. Clin. Physiol. Funct. Imaging 2005, 25, 51–57. [Google Scholar] [CrossRef]
- Magalhaes, C.; Mendes, J.; Vardasca, R. Meta-Analysis and Systematic Review of the Application of Machine Learning Classifiers in Biomedical Applications of Infrared Thermography. Appl. Sci. 2021, 11, 842. [Google Scholar] [CrossRef]
- Mashekova, A.; Zhao, Y.; Ng, E.Y.; Zarikas, V.; Fok, S.C.; Mukhmetov, O. Early Detection of the Breast Cancer Using Infrared Technology–A Comprehensive Review. Therm. Sci. Eng. Prog. 2022, 27, 101142. [Google Scholar] [CrossRef]
- Bagavathiappan, S.; Saravanan, T.; Philip, J.; Jayakumar, T.; Raj, B.; Karunanithi, R.; Panicker, T.M.R.; Korath, M.; Jagadeesan, K. Infrared Thermal Imaging for Detection of Peripheral Vascular Disorders. J. Med. Phys. 2009, 34, 43. [Google Scholar] [CrossRef] [PubMed]
- Sanchis-Sánchez, E.; Vergara-Hernández, C.; Cibrián, R.M.; Salvador, R.; Sanchis, E.; Codoñer-Franch, P. Infrared Thermal Imaging in the Diagnosis of Musculoskeletal Injuries: A Systematic Review and Meta-Analysis. Am. J. Roentgenol. 2014, 203, 875–882. [Google Scholar] [CrossRef]
- Medica, E.M. Musculoskeletal Applications of Infrared Thermography on Back and Neck Syndromes: Systematic Review. Eur. J. Phys. Rehabil. Med. 2020, 57, 386–396. [Google Scholar]
- Pereira, C.B.; Yu, X.; Czaplik, M.; Rossaint, R.; Blazek, V.; Leonhardt, S. Remote Monitoring of Breathing Dynamics Using Infrared Thermography. Biomed. Opt. Express 2015, 6, 4378. [Google Scholar] [CrossRef]
- Perpetuini, D.; Di Credico, A.; Filippini, C.; Izzicupo, P.; Cardone, D.; Chiacchiaretta, P.; Ghinassi, B.; Di Baldassarre, A.; Merla, A. Is It Possible to Estimate Average Heart Rate from Facial Thermal Imaging? Eng. Proc. 2021, 8, 10. [Google Scholar] [CrossRef]
- Jia, S.; Wang, Q.; Li, H.; Song, X.; Wang, S.; Zhang, W.; Wang, G. The Relationship Between Blood Perfusion in the Lower Extremities and Heart Rate Variability at Different Positions. Front. Physiol. 2021, 12, 656527. [Google Scholar] [CrossRef] [PubMed]
- Werner, G.G.; Ford, B.Q.; Mauss, I.B.; Schabus, M.; Blechert, J.; Wilhelm, F.H. High Cardiac Vagal Control Is Related to Better Subjective and Objective Sleep Quality. Biol. Psychol. 2015, 106, 79–85. [Google Scholar] [CrossRef] [PubMed]
- Guo, X.; Su, T.; Xiao, H.; Xiao, R.; Xiao, Z. Using 24-h Heart Rate Variability to Investigate the Sleep Quality and Depression Symptoms of Medical Students. Front. Psychiatry 2022, 12, 781673. [Google Scholar] [CrossRef] [PubMed]
- Castro-Diehl, C.; Diez Roux, A.V.; Redline, S.; Seeman, T.; McKinley, P.; Sloan, R.; Shea, S. Sleep Duration and Quality in Relation to Autonomic Nervous System Measures: The Multi-Ethnic Study of Atherosclerosis (MESA). Sleep 2016, 39, 1927–1940. [Google Scholar] [CrossRef] [PubMed]
- Elmore-Staton, L.; El-Sheikh, M.; Vaughn, B.; Arsiwalla, D.D. Preschoolers’ Daytime Respiratory Sinus Arrhythmia and Nighttime Sleep. Physiol. Behav. 2012, 107, 414–417. [Google Scholar] [CrossRef] [PubMed]
- Moebus, M.; Holz, C. Personalized Interpretable Prediction of Perceived Sleep Quality: Models with Meaningful Cardiovascular and Behavioral Features. PLoS ONE 2024, 19, e0305258. [Google Scholar] [CrossRef] [PubMed]
- Penzel, T.; Kantelhardt, J.W.; Grote, L.; Peter, J.-H.; Bunde, A. Comparison of Detrended Fluctuation Analysis and Spectral Analysis for Heart Rate Variability in Sleep and Sleep Apnea. IEEE Trans. Biomed. Eng. 2003, 50, 1143–1151. [Google Scholar] [CrossRef] [PubMed]
- Carneiro, E.R.; Azoubel, L.A.; Dias, R.C.; Dias, C.J.; Sá, E.S.; Brito, D.A.; Salgado Filho, N.; Santos, E.F.; Rocco, J.H.; Mostarda, C.T. Correlation of Sleep Quality and Cardiac Autonomic Modulation in Hemodialysis Patients. Sleep Sci. 2022, 15, 59–64. [Google Scholar] [CrossRef]
- Montesinos, L.; Castaldo, R.; Cappuccio, F.P.; Pecchia, L. Day-to-Day Variations in Sleep Quality Affect Standing Balance in Healthy Adults. Sci. Rep. 2018, 8, 17504. [Google Scholar] [CrossRef]
- Yuda, E.; Yoshida, Y.; Hayano, J. Relationship between Subjective Assessment of Sleep Quality and Heart Rate Variability during Sleep. In Proceedings of the 2018 IEEE International Conference on Consumer Electronics-Taiwan (ICCE-TW), Taichung, Taiwan, 19–21 May 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1–2. [Google Scholar]
- Vyazovskiy, V. Sleep, Recovery, and Metaregulation: Explaining the Benefits of Sleep. NSS 2015, 2015, 171–184. [Google Scholar] [CrossRef]
- Yin, J.; Xu, J.; Ren, T.-L. Recent Progress in Long-Term Sleep Monitoring Technology. Biosensors 2023, 13, 395. [Google Scholar] [CrossRef]
- Sztajzel, J. Heart Rate Variability: A Noninvasive Electrocardiographic Method to Measure the Autonomic Nervous System. Swiss Med. Wkly. 2004, 134, 3536. [Google Scholar] [CrossRef]
- Hsu, H.-C.; Lee, H.-F.; Lin, M.-H. Exploring the Association between Sleep Quality and Heart Rate Variability among Female Nurses. Int. J. Environ. Res. Public Health 2021, 18, 5551. [Google Scholar] [CrossRef]
- Tobaldini, E.; Nobili, L.; Strada, S.; Casali, K.R.; Braghiroli, A.; Montano, N. Heart Rate Variability in Normal and Pathological Sleep. Front. Physiol. 2013, 4, 294. [Google Scholar] [CrossRef]
- Burr, R.L. Interpretation of Normalized Spectral Heart Rate Variability Indices In Sleep Research: A Critical Review. Sleep 2007, 30, 913–919. [Google Scholar] [CrossRef]
- Fatt, S.J.; Beilharz, J.E.; Joubert, M.; Wilson, C.; Lloyd, A.R.; Vollmer-Conna, U.; Cvejic, E. Parasympathetic Activity Is Reduced during Slow-Wave Sleep, but Not Resting Wakefulness, in Patients with Chronic Fatigue Syndrome. J. Clin. Sleep Med. 2020, 16, 19–28. [Google Scholar] [CrossRef]
- Shaffer, F.; Ginsberg, J.P. An Overview of Heart Rate Variability Metrics and Norms. Front. Public Health 2017, 5, 258. [Google Scholar] [CrossRef]
- Raymann, R.J.; Swaab, D.F.; Van Someren, E.J. Cutaneous Warming Promotes Sleep Onset. Am. J. Physiol.-Regul. Integr. Comp. Physiol. 2005, 288, R1589–R1597. [Google Scholar] [CrossRef]
- Te Lindert, B.H.; Van Someren, E.J. Skin Temperature, Sleep, and Vigilance. Handb. Clin. Neurol. 2018, 156, 353–365. [Google Scholar]
- Ko, Y.; Lee, J.-Y. Effects of Feet Warming Using Bed Socks on Sleep Quality and Thermoregulatory Responses in a Cool Environment. J. Physiol. Anthropol. 2018, 37, 1–11. [Google Scholar] [CrossRef] [PubMed]
- Silvani, A. Orexins and the Cardiovascular Events of Awakening. Temperature 2017, 4, 128–140. [Google Scholar] [CrossRef]
- Romeijn, N.; Van Someren, E.J. Correlated Fluctuations of Daytime Skin Temperature and Vigilance. J. Biol. Rhythm. 2011, 26, 68–77. [Google Scholar] [CrossRef] [PubMed]
- Lan, L.; Xia, L.; Tang, J.; Wyon, D.P.; Liu, H. Mean Skin Temperature Estimated from 3 Measuring Points Can Predict Sleeping Thermal Sensation. Build. Environ. 2019, 162, 106292. [Google Scholar] [CrossRef]
- van der Heide, A.; Donjacour, C.E.; Pijl, H.; Reijntjes, R.H.; Overeem, S.; Lammers, G.J.; Van Someren, E.J.; Fronczek, R. The Effects of Sodium Oxybate on Core Body and Skin Temperature Regulation in Narcolepsy. J. Sleep Res. 2015, 24, 566–575. [Google Scholar] [CrossRef]
- Ichiba, T.; Suzuki, M.; Aritake-Okada, S.; Uchiyama, M. Periocular Skin Warming Promotes Body Heat Loss and Sleep Onset: A Randomized Placebo-Controlled Study. Sci. Rep. 2020, 10, 20325. [Google Scholar] [CrossRef]
- Ioannidou, I.; Sklavos, N. On General Data Protection Regulation Vulnerabilities and Privacy Issues, for Wearable Devices and Fitness Tracking Applications. Cryptography 2021, 5, 29. [Google Scholar] [CrossRef]
- Farah, N.M.; Saw Yee, T.; Mohd Rasdi, H.F. Self-Reported Sleep Quality Using the Malay Version of the Pittsburgh Sleep Quality Index (PSQI-M) In Malaysian Adults. Int. J. Environ. Res. Public Health 2019, 16, 4750. [Google Scholar] [CrossRef] [PubMed]
- Lemola, S.; Richter, D. The Course of Subjective Sleep Quality in Middle and Old Adulthood and Its Relation to Physical Health. J. Gerontol. Ser. B 2013, 68, 721–729. [Google Scholar] [CrossRef]
- Camm, J. Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology. Heart Rate Variability: Standards of Measurement, Physiological Interpretation and Clinical Use. Circulation 1996, 93, 1043–1065. [Google Scholar]
- Burma, J.S.; Graver, S.; Miutz, L.N.; Macaulay, A.; Copeland, P.V.; Smirl, J.D. The Validity and Reliability of Ultra-Short-Term Heart Rate Variability Parameters and the Influence of Physiological Covariates. J. Appl. Physiol. 2021, 130, 1848–1867. [Google Scholar] [CrossRef]
- Diakides, M.; Bronzino, J.D.; Peterson, D.R. Medical Infrared Imaging: Principles and Practices; CRC Press: Boca Raton, FL, USA, 2012; ISBN 978-1-4398-7250-5. [Google Scholar]
- Marins, J.C.B.; Formenti, D.; Costa, C.M.A.; de Andrade Fernandes, A.; Sillero-Quintana, M. Circadian and Gender Differences in Skin Temperature in Militaries by Thermography. Infrared Phys. Technol. 2015, 71, 322–328. [Google Scholar] [CrossRef]
- Di Credico, A.; Perpetuini, D.; Izzicupo, P.; Gaggi, G.; Cardone, D.; Filippini, C.; Merla, A.; Ghinassi, B.; Di Baldassarre, A. Estimation of Heart Rate Variability Parameters by Machine Learning Approaches Applied to Facial Infrared Thermal Imaging. Front. Cardiovasc. Med. 2022, 9, 893374. [Google Scholar] [CrossRef] [PubMed]
- Di Credico, A.; Petri, C.; Cataldi, S.; Greco, G.; Suarez-Arrones, L.; Izzicupo, P. Heart Rate Variability, Recovery and Stress Analysis of an Elite Rally Driver and Co-Driver during a Competition Period. Sci. Prog. 2024, 107, 00368504231223034. [Google Scholar] [CrossRef]
- Cardone, D.; Spadolini, E.; Perpetuini, D.; Filippini, C.; Maria Chiarelli, A.; Merla, A. Automated Warping Procedure for Facial Thermal Imaging Based on Features Identification in the Visible Domain. Infrared Phys. Technol. 2020, 112, 103595. [Google Scholar] [CrossRef]
- Perpetuini, D.; Formenti, D.; Cardone, D.; Filippini, C.; Merla, A. Regions of Interest Selection and Thermal Imaging Data Analysis in Sports and Exercise Science: A Narrative Review. Physiol. Meas. 2021, 42, 08TR01. [Google Scholar] [CrossRef]
- Richman, J.S.; Moorman, J.R. Physiological Time-Series Analysis Using Approximate Entropy and Sample Entropy. Am. J. Physiol.-Heart Circ. Physiol. 2000, 278, H2039–H2049. [Google Scholar] [CrossRef]
- Geyer, M.J.; Jan, Y.-K.; Brienza, D.M.; Boninger, M.L. Using Wavelet Analysis to Characterize the Thermoregulatory Mechanisms of Sacral Skin Blood Flow. J. Rehabil. Res. Dev. 2004, 41, 6. [Google Scholar] [CrossRef]
- Kohavi, R.; John, G.H. Wrappers for Feature Subset Selection. Artif. Intell. 1997, 97, 273–324. [Google Scholar] [CrossRef]
Feature Set | Model | TPR | TNR | Accuracy |
---|---|---|---|---|
HRV | DT | 66.7 | 66.7 | 66.7 |
SVM | 83.3 | 72.2 | 77.8 | |
KNN | 80.0 | 40.0 | 60.0 | |
ENS | 73.3 | 73.3 | 73.3 | |
NN | 86.7 | 46.7 | 66.7 | |
IRT | DT | 73.3 | 66.7 | 70.0 |
SVM | 86.7 | 60.0 | 73.4 | |
KNN | 80.0 | 46.7 | 63.4 | |
ENS | 86.7 | 60.0 | 73.4 | |
NN | 66.7 | 66.7 | 66.7 | |
HRV + IRT | DT | 80.0 | 26.7 | 53.4 |
SVM | 86.7 | 80.0 | 83.4 | |
KNN | 80.0 | 46.7 | 63.4 | |
ENS | 80.0 | 53.3 | 66.7 | |
NN | 86.7 | 60.0 | 73.4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Di Credico, A.; Perpetuini, D.; Izzicupo, P.; Gaggi, G.; Mammarella, N.; Di Domenico, A.; Palumbo, R.; La Malva, P.; Cardone, D.; Merla, A.; et al. Predicting Sleep Quality through Biofeedback: A Machine Learning Approach Using Heart Rate Variability and Skin Temperature. Clocks & Sleep 2024, 6, 322-337. https://doi.org/10.3390/clockssleep6030023
Di Credico A, Perpetuini D, Izzicupo P, Gaggi G, Mammarella N, Di Domenico A, Palumbo R, La Malva P, Cardone D, Merla A, et al. Predicting Sleep Quality through Biofeedback: A Machine Learning Approach Using Heart Rate Variability and Skin Temperature. Clocks & Sleep. 2024; 6(3):322-337. https://doi.org/10.3390/clockssleep6030023
Chicago/Turabian StyleDi Credico, Andrea, David Perpetuini, Pascal Izzicupo, Giulia Gaggi, Nicola Mammarella, Alberto Di Domenico, Rocco Palumbo, Pasquale La Malva, Daniela Cardone, Arcangelo Merla, and et al. 2024. "Predicting Sleep Quality through Biofeedback: A Machine Learning Approach Using Heart Rate Variability and Skin Temperature" Clocks & Sleep 6, no. 3: 322-337. https://doi.org/10.3390/clockssleep6030023
APA StyleDi Credico, A., Perpetuini, D., Izzicupo, P., Gaggi, G., Mammarella, N., Di Domenico, A., Palumbo, R., La Malva, P., Cardone, D., Merla, A., Ghinassi, B., & Di Baldassarre, A. (2024). Predicting Sleep Quality through Biofeedback: A Machine Learning Approach Using Heart Rate Variability and Skin Temperature. Clocks & Sleep, 6(3), 322-337. https://doi.org/10.3390/clockssleep6030023