braindecode.augmentation.functional.segmentation_reconstruction#

braindecode.augmentation.functional.segmentation_reconstruction(X, y, n_segments, data_classes, rand_indices, idx_shuffle)[source]#

Segment and reconstruct EEG data from [1].

See [1] for details.

Parameters:
  • X (torch.Tensor) – EEG input example or batch.

  • y (torch.Tensor) – EEG labels for the example or batch.

  • n_segments (int) – Number of segments to use in the batch.

  • rand_indices (array-like) – Array of indices that indicates which trial to use in each segment.

  • idx_shuffle (array-like) – Array of indices to shuffle the new generated trials.

Returns:

  • torch.Tensor – Transformed inputs.

  • torch.Tensor – Transformed labels.

References

[1] (1,2)

Lotte, F. (2015). Signal processing approaches to minimize or suppress calibration time in oscillatory activity-based brain–computer interfaces. Proceedings of the IEEE, 103(6), 871-890.