Validating CircaCP: a generic sleep–wake cycle detection algorithm for unlabelled actigraphy data - Chen, Shanshan; Sun, Xinxin (Royal Society open science, 2024)
Sleep–wake (SW) cycle detection is a key step for extracting temporal sleep metrics from actigraphy. Various supervised learning algorithms have been developed, yet their generalizability from sensor to sensor or study to study is questionable. In this paper, we detail and validate an unsupervised algorithm—CircaCP—for detecting SW cycles from actigraphy. It first uses a robust cosinor model to estimate circadian rhythm, then searches for a single change point (CP) within each circadian cycle. Using CircaCP, we estimated sleep/wake onset times (S/WOTs) from 2125 individuals’ data in the MESA sleep study and compared the estimated S/WOTs against self-reported S/WOT event markers, using Bland–Altman analysis as well as variance component analysis. On average, SOTs estimated by CircaCP were 3.6 min behind those reported by event markers, and WOTs by CircaCP were less than 1 min behind those reported by markers. These differences accounted for less than 0.2% variability in S/WOTs, considering other sources of between-subject variations. Rooted in first principles of human circadian rhythms, our algorithm transferred seamlessly from children’s hip-worn ActiGraph data to ageing adults’ wrist-worn Actiwatch data. The generalizability of our algorithm suggests that it can be widely applied to actigraphy collected by other sensors and studies.