timesead.data.transforms.general_transforms

Classes

SubsampleTransform

Subsample sequences by a specified factor. subsampling_factor consecutive datapoints in a sequence will be

CacheTransform

Caches the results from a previous Transform in memory so that expensive

LimitTransform

Limits the amount of data points returned.

Module Contents

class timesead.data.transforms.general_transforms.SubsampleTransform(parent: timesead.data.transforms.transform_base.Transform, subsampling_factor: int, aggregation: str = 'first')

Bases: timesead.data.transforms.transform_base.Transform

Subsample sequences by a specified factor. subsampling_factor consecutive datapoints in a sequence will be aggregated into one point using the aggregation function.

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

  • subsampling_factor (int) – This specifies the number of consecutive data points that will be aggregated.

  • aggregation (str) – The function that should be applied to aggregate a window of data points. Can be either ‘mean’, ‘last’ or ‘first’.

subsampling_factor
property seq_len
class timesead.data.transforms.general_transforms.CacheTransform(parent: timesead.data.transforms.transform_base.Transform)

Bases: timesead.data.transforms.transform_base.Transform

Caches the results from a previous Transform in memory so that expensive calculations do not have to be recomputed.

Parameters:

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

cache
class timesead.data.transforms.general_transforms.LimitTransform(parent: timesead.data.transforms.transform_base.Transform, count: int)

Bases: timesead.data.transforms.transform_base.Transform

Limits the amount of data points returned.

Parameters:
max_count
__len__()