| Literature DB >> 35562527 |
Ignacio Perez-Pozuelo1,2, Marius Posa3, Joao Palotti4, Dimitris Spathis5, Kate Westgate6, Nicholas Wareham6, Cecilia Mascolo5, Søren Brage6.
Abstract
The adoption of multisensor wearables presents the opportunity of longitudinal monitoring of sleep in large populations. Personalized yet device-agnostic algorithms can sidestep laborious human annotations and objectify cross-cohort comparisons. We developed and tested a heart rate-based algorithm that captures inter- and intra-individual sleep differences in free-living conditions and does not require human input. We evaluated it on four study cohorts using different research- and consumer-grade devices for over 2000 nights. Recording periods included both 24 h free-living and conventional lab-based night-only data. We compared our optimized method against polysomnography, sleep diaries and sleep periods produced through a state-of-the-art acceleration based method. Against sleep diaries, the algorithm yielded a mean squared error of 0.04-0.06 and a total sleep time (TST) deviation of [Formula: see text]2.70 (± 5.74) and 12.80 (± 3.89) minutes, respectively. When evaluated with PSG lab studies, the MSE ranged between 0.06 and 0.11 yielding a time deviation between [Formula: see text]29.07 and [Formula: see text]55.04 minutes. These results showcase the value of this open-source, device-agnostic algorithm for the reliable inference of sleep in free-living conditions and in the absence of annotations.Entities:
Mesh:
Year: 2022 PMID: 35562527 PMCID: PMC9106748 DOI: 10.1038/s41598-022-11792-7
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.996
Summary of population size and devices used in the different datasets.
| Study | # Participants | Sensor type | Wearable device make | PSG | Sleep Diary |
|---|---|---|---|---|---|
| 158 | Triaxial accelerometer (3) Wearable ECG | AX3, Axivity (Newcastle,UK) Actiheart, CamNtech (Cambridge,UK) | |||
| 1154 | Actigraphy monitor ECG | Actiwatch Spectrum, Philips Respironics (PA,USA) | |||
| 22 | Triaxial accelerometer Heart rate sensor (PPG) | Apple Watch (Series 2,3), Apple (CA, USA) | |||
| 20 | Triaxial accelerometer Heart rate sensor | ActiGraph wGT3X-BT, ActiGraph LLC (FL,USA) Polar H7, Polar Electro Inc (NY,USA) |
Figure 1Cumulative distribution function for BBVS heart rates. The figure shows the HR ECDF for the full-day across all participants and all days, where the yellow dotted line shows the 0.35 HR quantile cutoff. Each individual line represents one participant for one day of recording.
Figure 2Heart rate sleep algorithm description. The approach can be broken down into three distinct steps. The first step, involves obtaining the wearable sensor HR data, pre-processing that data and setting initial sleep blocks through ECDF quantile thresholds Q. Blocks longer than L minutes are kept and merged with other blocks if their gap is smaller than G minutes. We extract the limits of the resulting blocks as sleep candidate for sleep onset and offset. Next, rolling heart rate volatility is used to refine these candidate times by finding nearby periods where this volatility is high. Finally, nap and awakenings are labeled, the former coming from the candidate sleep blocks not included in the largest sleep window, while the latter are short periods (<60 minutes) within the sleep window when the heart rate exceeds the daytime threshold. A detailed description of this algorithm and parameters used can be found in the methods section. The icons used in this figure are licensed under Creative Commons by thenounproject.com.
Figure 3Heart rate sleep algorithm in action for a participant chosen at random. The first step involves setting initial sleep blocks through ECDF quantile thresholds (in this experiment, ). Blocks longer than are kept and merged if the gap between blocks is smaller than minutes. We extract the limits of the resulting blocks as candidate state changes. The bottom panel highlights the use of rolling heart rate volatility to refine these candidate times by finding nearby periods where this volatility is high. The resulting candidate times designate each day’s main sleep window.
Summary of data set demographics.
| Feature | Biobank validation study (BBVS) | Multi-ethnic study of atherosclerosis (MESA) | PhysioNet apple watch | Multilevel monitoring of activity and sleep in healthy people (MMASH) |
|---|---|---|---|---|
| 193 | 2230 | 31 | 22 | |
| 54.13 (6.95) | 68.65 (8.91) | 29.42 (8.52) | 26.05 (7.12) | |
| 54.40 | 46.28 | 32.26 | 100 | |
| 26.21 (3.21) | Not available | Not recorded | 23.12 (3.09) |
Optimal hyper parameters extracted from a grid search on the BBVS dataset for both full-day and night-only data. These parameters are used accordingly on the other three datasets studied in this work.
| Scenario | HR quantile threshold (Q) | Minimum length (L) | Gap merging threshold (G) |
|---|---|---|---|
| Full Day | 0.325 | 20 | 90 |
| Night Only | 0.800 | 20 | 420 |
Results of applying the HR algorithm on the BBVS dataset for both full-day and night-only data. Comparisons are made against sleep diaries. BBVS TST for diaries mean ± 95% CI = 7.739 ± 0.073 hours (464.34 ± 4.38 minutes).
| Sleep parameter | Metric | HR algorithm (Full day) | HR algorithm (Night only) | |
|---|---|---|---|---|
| (mean ± 95% CI) | Value (mean ± 95% CI) | |||
| Total sleep time | Time difference (minutes) | −2.70 ± 5.74 | 12.80 ± 3.89 | < 0.00 |
| MSE | 0.06 ± 0.00 | 0.04 ± 0.00 | < 0.00 | |
| Cohen’s kappa | 0.86 ± 0.00 | 0.90 ± 0.00 | < 0.00 | |
| Sleep onset | Time difference (minutes) | −0.49 ± 5.67 | −4.59 ± 3.27 | 0.158 |
| Sleep offset (Wake Up) | Time difference (minutes) | −3.19 ± 4.80 | 8.20 ± 2.88 | < 0.00 |
Comparison of angle algorithm performance for the BBVS dataset by the limb on which the device was worn. All participants wore devices on their dominant (dw) and non-dominant (ndw) wrist as well as on their thigh. The best performance metrics were obtained for the non-dominant wrist device, but thigh wearables gave the least time differences overall in terms of total sleep time (TST), sleep onset and offset. BBVS TST for diaries mean ± 95% CI = 7.739 ± 0.073 hours (464.34 ± 4.38 minutes).
| Sleep parameter | Metric | Angle change algo. (ndw) | Angle change algo.(dw) | Angle change algo. (Thigh) | ||
|---|---|---|---|---|---|---|
| Value (mean ± 95% CI) | Value (mean ± 95% CI) | ndw-dw | Value (mean ± 95% CI) | ndw-thigh | ||
| Total sleep time | Time difference (min.) | 222.64 ± 7.78 | 218.96 ± 7.92 | 0.271 | 214.90 ±8.08 | 0.048 |
| MSE | 0.16 ± 0.00 | 0.16 ± 0.00 | 0.052 | 0.16 ± 0.00 | 0.291 | |
| Cohen’s kappa | 0.58 ± 0.01 | 0.59 ± 0.01 | 0.027 | 0.58 ± 0.01 | 0.650 | |
| Sleep onset | Time difference (min.) | −100.99 ± 6.63 | −96.00 ± 7.01 | 0.167 | −96.07 ± 7.85 | 0.250 |
| Sleep offset (Wake Up) | Time difference (min.) | 121.65 ± 7.05 | 122.96 ± 7.43 | 0.727 | 118.82 ± 8.11 | 0.501 |
Figure 4Modified Bland-Altman plot for BBVS. Modified Bland-Altman plot on the left shows the TST differences (delta) between the full-day HR algorithm and diary in the Y-axis and the X-axis shows the TST average for every participant. The figure to the right shows the same comparison for the angle algorithm and diaries in BBVS. Dashed lines represent limits of agreement (LoA) which are defined as the mean difference ± 1.96 SD of differences. TST: total sleep time.
Figure 5Example participant (chosen at random), showcasing estimated sleep through the heart rate sleep window algorithm, sleep diary sleep onset and offset and angle changes for both wrists and the thigh accelerometers. The algorithm picks up subtle sleep regularity differences at a participant level. This approach overlaps more closely to the sleep diary than any of the accelerometer-based approaches. Notice that, for the angle change approach, the algorithm is more effective on the non-dominant wrist accelerometer than on the dominant wrist or thigh accelerometer for most nights. TST: total sleep time.
Results for the MESA dataset. Both the HR algorithm and sleep diaries are evaluated against PSG. Results are also shown for the subset of healthy participants and participants with sleep disorders. MESA TST for PSG mean ± 95% CI = 7.433 ± 0.079 hours (445.95 ± 4.71 minutes). N=1,154.
| Sleep parameter | Metric | HR algorithm | Sleep diary | |
|---|---|---|---|---|
| Value (mean ± 95% CI) | Value (mean ± 95% CI) | |||
| Total sleep time | Time difference (min.) | −55.04 ± 3.75 | −34.04 ± 5.50 | < 0.00 |
| MSE | 0.11 ± 0.01 | 0.13 ± 0.01 | < 0.00 | |
| Cohen’s kappa | 0.59 ± 0.02 | 0.62 ± 0.01 | 0.01 | |
| Sleep onset | Time difference (min.) | 39.72± 3.01 | 6.25 ± 3.30 | < 0.00 |
| Sleep offset (Wake Up) | Time difference (min.) | −15.32 ± 2.52 | −27.79 ± 4.86 | < 0.00 |
Figure 6Modified Bland-Altman plot for MESA. Modified Bland-Altman plot on the left shows the TST differences (delta) between the HR algorithm and PSG in the Y-axis and the X-axis shows the TST average for every participant. The figure to the right shows the same comparison for the sleep diaries and PSG in MESA. Further, healthy participants are color coded in blue for both plots and participants that were diagnosed with sleep disorders are shown in orange.
Results for the PhysioNet Apple Watch dataset. The table presents results for both the HR and angle change algorithm for total sleep time, sleep onset and sleep offset in the PhysioNet Apple Watch dataset. PhysioNet Apple Watch TST for PSG mean ± 95% CI = 7.165 ± 0.544 (429.89 ± 32.65 minutes). ndw: Non-dominant Wrist. N = 22.
| Sleep parameter | Metric | HR Algorithm | Angle change algorithm (ndw) | |
|---|---|---|---|---|
| Value (mean ± 95% CI) | Value (mean ± 95% CI) | (n = 22) | ||
| Total sleep time | Time difference (minutes) | −29.07 ± 13.38 | 44.39 ± 40.01 | 0.001 |
| MSE | 0.07 ± 0.03 | 0.12 ± 0.08 | 0.277 | |
| Cohen’s kappa | 0.59 ± 0.12 | 0.71 ± 0.13 | 0.234 | |
| Sleep onset | Time difference (minutes) | 20.73 ± 5.45 | −21.77 ± 29.77 | 0.008 |
| Sleep offset (Wake Up) | Time difference (minutes) | −8.34 ± 11.98 | 22.61 ± 31.01 | 0.056 |
Results for the MMASH dataset. The table presents results for both versions of the HR algorithm and compares them to the angle change algorithm for total sleep time, sleep onset and sleep offset in the MMASH dataset. MMASH TST for diaries mean ± 95% CI = 6.200 ± 0.622 hours (371.98 ± 37.33 minutes). ndw: Non-dominant Wrist. N = 21.
| Sleep param. | Metric | HR Algo. Full Day - HRD | Angle change Algo. (ndw) | HR Algo. Only Night - HRN | ||
|---|---|---|---|---|---|---|
| Value (mean ± 95% CI) | Value (mean ± 95% CI) | (ndw - HRD) | Value (mean ± 95% CI) | (ndw - HRN) | ||
| Total sleep time | Time difference (min) | 17.64 ± 47.78 | −55.86 ± 42.67 | 0.009 | −34.36 ± 35.24 | 0.366 |
| MSE | 0.11± 0.04 | 0.10 ± 0.04 | 0.487 | 0.09 ± 0.03 | 0.742 | |
| Cohen’s kappa | 0.75 ± 0.10 | 0.78 ± 0.09 | 0.465 | 0.80 ± 0.06 | 0.692 | |
| Sleep onset | Time difference (min) | −39.14 ± 44.60 | 9.55 ± 34.87 | 0.127 | 36.00 ± 24.85 | 0.204 |
| Sleep offset | Time difference (min) | −21.50 ± 33.85 | −46.31 ± 31.64 | 0.080 | 1.64 ± 33.09 | < 0.00 |