timesead.data.transforms.general_transforms =========================================== .. py:module:: timesead.data.transforms.general_transforms Classes ------- .. autoapisummary:: timesead.data.transforms.general_transforms.SubsampleTransform timesead.data.transforms.general_transforms.CacheTransform timesead.data.transforms.general_transforms.LimitTransform Module Contents --------------- .. py:class:: SubsampleTransform(parent: timesead.data.transforms.transform_base.Transform, subsampling_factor: int, aggregation: str = 'first') Bases: :py:obj:`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. :param parent: Another :class:`~timesead.data.transforms.Transform` which is used as the data source for this :class:`~timesead.data.transforms.Transform`. :param subsampling_factor: This specifies the number of consecutive data points that will be aggregated. :param aggregation: The function that should be applied to aggregate a window of data points. Can be either 'mean', 'last' or 'first'. .. py:attribute:: subsampling_factor .. py:property:: seq_len .. py:class:: CacheTransform(parent: timesead.data.transforms.transform_base.Transform) Bases: :py:obj:`timesead.data.transforms.transform_base.Transform` Caches the results from a previous :class:`~timesead.data.transforms.Transform` in memory so that expensive calculations do not have to be recomputed. :param parent: Another :class:`~timesead.data.transforms.Transform` which is used as the data source for this :class:`~timesead.data.transforms.Transform`. .. py:attribute:: cache .. py:class:: LimitTransform(parent: timesead.data.transforms.transform_base.Transform, count: int) Bases: :py:obj:`timesead.data.transforms.transform_base.Transform` Limits the amount of data points returned. :param parent: Another :class:`~timesead.data.transforms.Transform` which is used as the data source for this :class:`~timesead.data.transforms.Transform`. :param count: The max number of sequences that should be returned by this :class:`~timesead.data.transforms.Transform`. .. py:attribute:: max_count .. py:method:: __len__()