HorizontalFlip¶
- class torcheeg.transforms.HorizontalFlip(location_dict: dict | None, channel_dim: int = 0)[source][source]¶
Flip the EEG signal horizontally based on the electrode’s position.
from torcheeg import transforms from torcheeg.datasets.constants.motor_imagery import BCICIV2A_LOCATION_DICT eeg = np.random.randn(32, 4, 22, 128) t = transforms.HorizontalFlip( location_dict=BCICIV2A_LOCATION_DICT, channel_dim=2 ) t(eeg=eeg)['eeg'].shape >>> (32, 4, 22, 128)
- Parameters:
location_dict (dict) – The dict of electrodes and their postions.
channel_dim (int) – The dim of electrodes in EEG data.