Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Jun 6:16:699-710.
doi: 10.2147/NSS.S452799. eCollection 2024.

A Machine Learning Model for Predicting Sleep and Wakefulness Based on Accelerometry, Skin Temperature and Contextual Information

Affiliations

A Machine Learning Model for Predicting Sleep and Wakefulness Based on Accelerometry, Skin Temperature and Contextual Information

Aleksej Logacjov et al. Nat Sci Sleep. .

Abstract

Purpose: 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.

PubMed Disclaimer

Conflict of interest statement

The authors report no conflicts of interest in this work.

Figures

Figure 1
Figure 1
Example from one participant of the predicted sleep/wake based on the full model (A), the predicted sleep/wake based on accelerometry alone (B), the scoring of sleep/wake based on polysomnography (C), the cyclic time features (D-I), the fitted circadian rhythm curve based on the estimated mid-point of sleep (J), the skin temperature (K and L), and the overnight recording of accelerometry (M-R).
Figure 2
Figure 2
The three panels (A-C) illustrate the stepwise procedure used to train the machine learning (ML) model. In the first step (A), the ML model was trained using features derived from accelerometry (A), skin temperature data (T), and cyclic time (Cy). In the second step (B), the initial ML model trained in the first step was used to predict sleep/wake and determine the mid-point of sleep (MoS). A cosine wave with 24 h wavelength and maximum value at the MoS was used for the circadian rhythm curve approximation. In the third step (lower panel), the ML model was trained using all feature input (ie, A, T, Cy, and Ci).
Figure 3
Figure 3
Change in performance metrics when removing different feature modalities (ie, estimated circadian rhythm, skin temperature, or cyclic time) as input to the machine learning model compared to the model receiving all feature inputs. The bars are mean values and the error bars SD.
Figure 4
Figure 4
Bland-Altman plots indicating the difference in total sleep time (A and B) and sleep efficiency (C and D) predicted by the machine learning model when including accelerometry-derived features (A and C) and all features (B and D) versus the PSG-scored sleep time. The upper and lower dashed lines indicate the 95% limits of agreement and middle solid line the mean difference. The dotted horizontal line indicates zero (ie, line of equality). The regression line is indicated by the short, dotted line. The error bars on the right side indicate the 95% confidence interval for the limits of agreement and the mean difference.

Similar articles

Cited by

References

    1. Van de Water AT, Holmes A, Hurley DA. Objective measurements of sleep for non-laboratory settings as alternatives to polysomnography: a systematic review. J Sleep Res. 2011;20(1 Pt 2):183–200. doi:10.1111/j.1365-2869.2009.00814.x - DOI - PubMed
    1. Willetts M, Hollowell S, Aslett L, Holmes C, Doherty A. Statistical machine learning of sleep and physical activity phenotypes from sensor data in 96,220 UK Biobank participants. Sci Rep. 2018;8(1):7961. doi:10.1038/s41598-018-26174-1 - DOI - PMC - PubMed
    1. Su S, Li X, Xu Y, McCall WV, Wang X. Epidemiology of accelerometer-based sleep parameters in US school-aged children and adults: NHANES 2011-2014. Sci Rep. 2022;12(1):7680. doi:10.1038/s41598-022-11848-8 - DOI - PMC - PubMed
    1. Albers JD, Meertens RM, Savelberg H, et al. Both short and long sleep durations are associated with type 2 diabetes, independent from traditional lifestyle risk factors-The Maastricht Study. Sleep Health. 2023;9(5):733–741. doi:10.1016/j.sleh.2023.06.009 - DOI - PubMed
    1. de Paula D, Crochemore-Silva I, Griep RH, Duncan BB, Schmidt MI. Accelerometry measured movement behaviors in middle-aged and older adults: cross-sectional analysis of the ELSA-Brasil Study. J Phys Act Health. 2023;1–10. doi:10.1123/jpah.2023-0106 - DOI - PubMed