Statistical Learning Models for Sleep Quality Prediction Using Electrocardiograms

Oluwatosin Ogundare*
Department of Industrial, Manufacturing and Systems Engineering, Texas Tech University, Lubbock, TX, USA

© 2019 Oluwatosin Ogundare.

open-access license: This is an open access article distributed under the terms of the Creative Commons Attribution 4.0 International Public License (CC-BY 4.0), a copy of which is available at: This license permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

* Address correspondence to this author at the Department of Industrial, Manufacturing and Systems Engineering, Texas Tech University, Lubbock, TX, USA; Tel: +1-310-999-5809; E-mail:



The sleep quality prediction has implications beyond trivial. It enables the holistic management of the clinical ramifications of treating sleep disorders, which include providing a foundational framework for mitigating sleep medication abuse and sleep medication dosage control due to the foreknowledge of the quality of a future sleep episode. Sleep Quality (SQ) is presented as a function of sleep stages and as such, predicting sleep quality will involve predicting the future realization of a sleep episode in terms of transition between different sleep stages. Electrocardiograms (ECG) provided by the National Sleep Research Resource (NSRR) are analyzed and a Sleep Quality (SQ) value is predicted on an interval (0,1).


This research uses Support Vector Machines (SVM) and a polynomial regression model to forecast the Sleep Quality (SQ) of a future sleep episode. The statistical learning models are trained on the features extracted from the Electrocardiograms (ECG) signals in the training set. The datasets are composed of ECG signal from patients in the NSSR Sleep Health Heart Study (SHHS).


A confusion matrix comparing measured vs. predicted is presented as a measure of the performance of the SVM sleep stage as well as the comparison of the observed vs. predicted hypnogram in some cases. The Sleep Quality (SQ) values derived from classified forecasted PSD is compared with the measured Sleep Quality (SQ) values. Finally, a paired t-test is used to compare the predicted Sleep Quality (SQ) with the measured Sleep Quality (SQ) to determine if the difference between the two sets is significant.


This research presents a simple method to forecast Sleep Quality (SQ) values. Consequently, it can be used to establish a personal Sleep Quality (SQ) history for clinical diagnosis and treatment.

Keywords: Support vector machines, Sleep data analysis, Sleep quality prediction, Sleep Quality (SQ), Sleep health heart study, Electrocardiograms.