pyActigraphy.sleep.ScoringMixin.Crespo_AoT

ScoringMixin.Crespo_AoT(zeta=15, zeta_r=30, zeta_a=2, t=0.33, alpha='8h', beta='1h', estimate_zeta=False, seq_length_max=100, verbose=False)[source]

Automatic identification of activity onset/offset times, based on the Crespo algorithm.

Identification of the activity onset and offset times using the algorithm for automatic identification of activity-rest periods based on actigraphy, developped by Crespo et al. [1].

Parameters
  • zeta (int) – Maximum number of consecutive zeroes considered valid. Default is 15.

  • zeta_r (int) – Maximum number of consecutive zeroes considered valid (rest). Default is 30.

  • zeta_a (int) – Maximum number of consecutive zeroes considered valid (active). Default is 2.

  • t (float) – Percentile for invalid zeroes. Default is 0.33.

  • alpha (offset) – Average hours of sleep per night. Default is ‘8h’.

  • beta (offset) – Length of the padding sequence used during the processing. Default is ‘1h’.

  • estimate_zeta (Boolean) – If set to True, zeta values are estimated from the distribution of ratios of the number of series of consecutive zeroes to the number of series randomly chosen from the actigraphy data. Default is False.

  • seq_length_max (int) – Maximal length of the aforementioned random series. Default is 100.

  • verbose – If set to True, print the estimated values of zeta. Default is False.

Returns

aot – Arrays containing the estimated activity onset and offset times, respectively.

Return type

(ndarray, ndarray)

References

1

Crespo, C., Aboy, M., Fernández, J. R., & Mojón, A. (2012). Automatic identification of activity–rest periods based on actigraphy. Medical & Biological Engineering & Computing, 50(4), 329–340. http://doi.org/10.1007/s11517-012-0875-y

Examples