timesead.data.transforms.window_transform

Classes

WindowTransform

This Transform produces sliding windows from input sequences. Incomplete windows

Module Contents

class timesead.data.transforms.window_transform.WindowTransform(parent: timesead.data.transforms.transform_base.Transform, window_size: int, step_size: int = 1, reverse: bool = False)

Bases: timesead.data.transforms.transform_base.Transform

This Transform produces sliding windows from input sequences. Incomplete windows

(that can appear if step_size>1) will not be returned.

Parameters:
  • parent (timesead.data.transforms.transform_base.Transform) – Another Transform which is used as the data source for this Transform.

  • window_size (int) – The size of each window.

  • step_size (int) – The step size at which the sliding window is moved along the sequence.

  • reverse (bool) – If this is True, start the sliding window at the end of a sequence, instead of the start. Note that this will not reverse the order of sequences in the dataset and only applies within a single sequence.

window_size
step_size = 1
reverse = False
inverse_transform_index(item) Tuple[int, int]
Return type:

Tuple[int, int]

__len__()
property seq_len