braindecode.augmentation.functional.sensors_rotation

braindecode.augmentation.functional.sensors_rotation(X, y, sensors_positions_matrix, axis, angles, spherical_splines)

Interpolates EEG signals over sensors rotated around the desired axis with the desired angle.

Suggested in [1]

Parameters
Xtorch.Tensor

EEG input example or batch.

ytorch.Tensor

EEG labels for the example or batch.

sensors_positions_matrixnumpy.ndarray

Matrix giving the positions of each sensor in a 3D cartesian coordinate system. Should have shape (3, n_channels), where n_channels is the number of channels. Standard 10-20 positions can be obtained from mne through:

>>> ten_twenty_montage = mne.channels.make_standard_montage(
...    'standard_1020'
... ).get_positions()['ch_pos']
axis‘x’ | ‘y’ | ‘z’

Axis around which to rotate.

anglesarray-like

Array of float of shape (batch_size,) containing the rotation angles (in degrees) for each element of the input batch.

spherical_splinesbool

Whether to use spherical splines for the interpolation or not. When False, standard scipy.interpolate.Rbf (with quadratic kernel) will be used (as in the original paper).

References

1

Krell, M. M., & Kim, S. K. (2017). Rotational data augmentation for electroencephalographic data. In 2017 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC) (pp. 471-474).