timesead.data.transforms.artificial_anomalies
Classes
This Transform injects anomalies into the dataset. |
|
Transform that injects anomalies, that only depend on the anomaly interval. |
|
|
Module Contents
- class timesead.data.transforms.artificial_anomalies.InjectArtificialAnomaliesTransform(parent: timesead.data.transforms.transform_base.Transform, n: int, min_length: int = 1, max_length: int = 1)
Bases:
timesead.data.transforms.transform_base.TransformThis Transform injects anomalies into the dataset.
It expects the get_datapoint method of its parent to return a tuple of tuples of length 1.
- class timesead.data.transforms.artificial_anomalies.InjectIndependentArtificialAnomaliesTransform(parent: timesead.data.transforms.transform_base.Transform, anomaly_fn: Callable, n: int, min_length: int = 1, max_length: int = 1)
Bases:
InjectArtificialAnomaliesTransformTransform that injects anomalies, that only depend on the anomaly interval.
- Parameters:
parent (timesead.data.transforms.transform_base.Transform) – Another
Transformwhich is used as the data source for thisTransform.anomaly_fn (Callable) – Callable that adds an anomaly to an interval and returns a
torch.Tensorof the same size as its input.n (int) – Number of anomalies to insert.
min_length (int) – Minimum length of anomalies.
max_length (int) – Maximum length of anomalies.
- anomaly
- class timesead.data.transforms.artificial_anomalies.InjectWindowsArtificialAnomaliesTransform(parent: timesead.data.transforms.transform_base.Transform, mask_fn: Callable, n: int, min_length: int = 1, max_length: int = 1)
Bases:
InjectArtificialAnomaliesTransformTransformthat inject windows from somewhere else in the dataset as anomalies.- Parameters:
parent (timesead.data.transforms.transform_base.Transform) – Another
Transformwhich is used as the data source for thisTransform.mask_fn (Callable) – Callable that computes a mask to the features of an interval.
n (int) – Number of anomalies to insert.
min_length (int) – Minimum length of anomalies.
max_length (int) – Maximum length of anomalies.
- mask