timesead.data.transforms.general_transforms
Classes
Subsample sequences by a specified factor. subsampling_factor consecutive datapoints in a sequence will be |
|
Caches the results from a previous |
|
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.TransformSubsample 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
Transformwhich is used as the data source for thisTransform.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.TransformCaches the results from a previous
Transformin memory so that expensive calculations do not have to be recomputed.- Parameters:
parent (timesead.data.transforms.transform_base.Transform) – Another
Transformwhich is used as the data source for thisTransform.
- cache
- class timesead.data.transforms.general_transforms.LimitTransform(parent: timesead.data.transforms.transform_base.Transform, count: int)
Bases:
timesead.data.transforms.transform_base.TransformLimits the amount of data points returned.
- Parameters:
parent (timesead.data.transforms.transform_base.Transform) – Another
Transformwhich is used as the data source for thisTransform.count (int) – The max number of sequences that should be returned by this
Transform.
- max_count
- __len__()