skdh.sleep.AverageSleepDuration#

class skdh.sleep.AverageSleepDuration#

Compute the average duration of a sleep bout.

Methods

predict(lengths, starts, values)

Notes

Higher values indicate longer bouts of sleep.

References

[1]

J. Di et al., “Patterns of sedentary and active time accumulation are associated with mortality in US adults: The NHANES study,” bioRxiv, p. 182337, Aug. 2017, doi: 10.1101/182337.

predict(lengths, starts, values)#
Parameters:
lengthsnumpy.ndarray

Lengths of bouts.

startsnumpy.ndarray

Indices of bout starts

valuesnumpy.ndarray

Value of the bout.

Returns:
aspfloat

Average number of minutes per bout of sleep during total sleep opportunity.