Nature and Science of Sleep (Jun 2024)
A Machine Learning Model for Predicting Sleep and Wakefulness Based on Accelerometry, Skin Temperature and Contextual Information
Abstract
Aleksej Logacjov,1 Eivind Schjelderup Skarpsno,2,3 Atle Kongsvold,2 Kerstin Bach,1 Paul Jarle Mork2 1Department of Computer Science, Norwegian University of Science and Technology, Trondheim, Norway; 2Department of Public Health and Nursing, Norwegian University of Science and Technology, Trondheim, Norway; 3Department of Neurology and Clinical Neurophysiology, St. Olavs Hospital, Trondheim, NorwayCorrespondence: Aleksej Logacjov, Department of Computer Science, Faculty of Information Technology and Electrical Engineering, Norwegian University of Science and Technology, Trondheim, 7034, Norway, Email [email protected]: Body-worn accelerometers are commonly used to estimate sleep duration in population-based studies. However, since accelerometry-based sleep/wake-scoring relies on detecting body movements, the prediction of sleep duration remains a challenge. The aim was to develop and evaluate the performance of a machine learning (ML) model to predict accelerometry-based sleep duration and to explore if this prediction can be improved by adding skin temperature data, circadian rhythm based on the estimated midpoint of sleep, and cyclic time features to the model.Patients and Methods: Twenty-nine adults (17 females), mean (SD) age 40.2 (15.0) years (range 17– 70) participated in the study. Overnight polysomnography (PSG) was recorded in a sleep laboratory or at home along with body movement by two accelerometers with an embedded skin temperature sensor (AX3, Axivity, UK) positioned at the low back and thigh. The PSG scoring of sleep/wake was used as ground truth for training the ML model.Results: Based on pure accelerometer data input to the ML model, the specificity and sensitivity for predicting sleep/wake was 0.52 (SD 0.24) and 0.95 (SD 0.03), respectively. Adding skin temperature data and contextual information to the ML model improved the specificity to 0.72 (SD 0.20), while sensitivity remained unchanged at 0.95 (SD 0.05). Correspondingly, sleep overestimation was reduced from 54 min (228 min, limits of agreement range [LoAR]) to 19 min (154 min LoAR).Conclusion: An ML model can predict sleep/wake periods with excellent sensitivity and moderate specificity based on a dual-accelerometer set-up when adding skin temperature data and contextual information to the model.Keywords: actigraphy, epidemiology, sedentary behaviors, sleep quality, supervised machine learning, support vector machines