ml4gw.augmentations
This module contains transformations that may be useful for augmenting timeseries data during training
Classes
|
Takes a tensor of timeseries of arbitrary dimension and randomly inverts i.e. \(h(t) \rightarrow -h(t)\) each timeseries with probability |
|
Takes a tensor of timeseries of arbitrary dimension and randomly reverses i.e., \(h(t) \rightarrow h(-t)\). |
- class ml4gw.augmentations.SignalInverter(prob=0.5)
Bases:
ModuleTakes a tensor of timeseries of arbitrary dimension and randomly inverts i.e. \(h(t) \rightarrow -h(t)\) each timeseries with probability
prob.- Parameters:
prob (
float) -- Probability that a timeseries is inverted
- forward(X)
- Return type:
Float[Tensor, '*batch time']- Parameters:
X (Float[Tensor, '*batch time'])
- class ml4gw.augmentations.SignalReverser(prob=0.5)
Bases:
ModuleTakes a tensor of timeseries of arbitrary dimension and randomly reverses i.e., \(h(t) \rightarrow h(-t)\). each timeseries with probability
prob.- Parameters:
prob (
float) -- Probability that a kernel is reversed
- forward(X)
- Return type:
Float[Tensor, '*batch time']- Parameters:
X (Float[Tensor, '*batch time'])