skdh.sleep.SleepWakeTransitionProbability#
- class skdh.sleep.SleepWakeTransitionProbability#
Compute the probability of transitioning from sleep state to awake state
Methods
predict(lengths, starts, values)Notes
Higher values indicate more frequent switching between states, and as a result may indicate greater fragmentation of sleep.
The implementation is straightforward [1], and is simply defined as
\[satp = \frac{1}{\mu_{sleep}}\]where \(\mu_{sleep}\) is the mean sleep bout time.
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:
- satpfloat
Sleep to awake transition probability during the total sleep opportunity.