pyActigraphy.analysis.Fractal.segmentation

classmethod Fractal.segmentation(x, n, backward=False, overlap=False)[source]

Segmentation function

Segment the signal into non-overlapping windows of equal size.

Parameters
  • x (numpy.array) – Input array.

  • n (int) – Window size.

  • backward (bool, optional) – If set to True, start segmentation from the end of the signal. Default is False.

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

Returns

segments – Non-overlappping windows of size n.

Return type

numpy.array