skdh.sleep.WakeSleepTransitionProbability#

class skdh.sleep.WakeSleepTransitionProbability#

Compute the probability of transitioning from awake state to sleep 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_{awake}}\]

where \(\mu_{awake}\) is the mean awake 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:
astpfloat

Awake to sleep transition probability during the total sleep opportunity.