pyActigraphy.analysis.Fractal.fluctuations

classmethod Fractal.fluctuations(X, n, deg, overlap=False)[source]

Fluctuation function

The fluctuations are defined as the mean squared residuals of the least squares fit in each non-overlapping window.

Parameters
  • X (numpy.array) – Array of activity counts.

  • n (int) – Window size.

  • deg (int) – Degree(s) of the fitting polynomials.

  • overlap (bool, optional) – If set to True, consecutive windows during segmentation overlap by 50%. Default is False.

Returns

F – Array of mean squared residuals in each segment.

Return type

numpy.array