braindecode.augmentation.functional.gaussian_noise

braindecode.augmentation.functional.gaussian_noise(X, y, std, random_state=None)

Randomly add white Gaussian noise to all channels.

Suggested e.g. in [1], [2] and [3]

Parameters
Xtorch.Tensor

EEG input example or batch.

ytorch.Tensor

EEG labels for the example or batch.

stdfloat

Standard deviation to use for the additive noise.

random_state: int | numpy.random.Generator, optional

Seed to be used to instantiate numpy random number generator instance. Defaults to None.

Returns
torch.Tensor

Transformed inputs.

torch.Tensor

Transformed labels.

References

1

Wang, F., Zhong, S. H., Peng, J., Jiang, J., & Liu, Y. (2018). Data augmentation for eeg-based emotion recognition with deep convolutional neural networks. In International Conference on Multimedia Modeling (pp. 82-93).

2

Cheng, J. Y., Goh, H., Dogrusoz, K., Tuzel, O., & Azemi, E. (2020). Subject-aware contrastive learning for biosignals. arXiv preprint arXiv:2007.04871.

3

Mohsenvand, M. N., Izadi, M. R., & Maes, P. (2020). Contrastive Representation Learning for Electroencephalogram Classification. In Machine Learning for Health (pp. 238-253). PMLR.