Transformations¶
Transformations of the time series intended to be used in a similar fashion to torchvision. The user specifies a dictionary of Transformations in a particular order.
Example:
>>> transform = [
>>> {'Tensorize': None},
>>> {'LogTransform': {'targets': [0], 'offset': 1.0}},
>>> {'RemoveLast': {'targets': [0]}},
>>> {'Target': {'targets': [0]}}
>>> ]
-
class
transforms.LogTransform(offset=0.0, targets=None)¶ Natural logarithm of target covariate + offset.
\[y_i = log_e ( x_i + \mbox{offset} )\]
-
class
transforms.RemoveLast(targets=None)¶ Subtract last time series points from time series.
-
class
transforms.Target(targets)¶ Retain only target covariates for output.
-
class
transforms.Tensorize(device='cpu')¶ Convert ndarrays to Tensors.