braindecode.augmentation.functional.ft_surrogate¶
- braindecode.augmentation.functional.ft_surrogate(X, y, phase_noise_magnitude, random_state=None)¶
FT surrogate augmentation of a single EEG channel, as proposed in [1].
Function copied from https://github.com/cliffordlab/sleep-convolutions-tf and modified.
- Parameters
- Xtorch.Tensor
EEG input example or batch.
- ytorch.Tensor
EEG labels for the example or batch.
- phase_noise_magnitude: float
Float between 0 and 1 setting the range over which the phase pertubation is uniformly sampled: [0, phase_noise_magnitude * 2 * pi].
- random_state: int | numpy.random.Generator, optional
Used to draw the phase perturbation. Defaults to None.
- Returns
- torch.Tensor
Transformed inputs.
- torch.Tensor
Transformed labels.
References
- 1
Schwabedal, J. T., Snyder, J. C., Cakmak, A., Nemati, S., & Clifford, G. D. (2018). Addressing Class Imbalance in Classification Problems of Noisy Signals by using Fourier Transform Surrogates. arXiv preprint arXiv:1806.08675.