selfeeg.augmentation
This is the data augmentation module of the selfEEG library. It is divided in two submodules:
Functional: a collection of data augmentations compatible with numpy arrays and torch tensors moved to both CPU or GPU devices.
Compose: a collection of classes designed to combine data augmentations in complex patterns.
augmentation.compose module
Classes
Single Augmenter called sequentially from a list, following a circular order. |
|
Single augmentation with randomly chosen arguments. |
|
Random augmentation chosen from a given set. |
|
Multiple augmentations applied sequentially. |
|
Single static augmentation with preset arguments. |
augmentation.functional module
Functions
adds random noise filtered at specific bandwidths. |
|
add common EEG artifacts to the ArrayLike object. |
|
adds gaussian noise with the desired standard deviation. |
|
add noise to the input ArrayLike object such that its SNR (Signal to Noise Ratio) will be the one desired. |
|
changes the reference of all EEG record in the ArrayLike object. |
|
puts to 0 a given (or random) amount of channels of the ArrayLike object. |
|
crops some segments of the ArrayLike object. |
|
applies a bandpass filter on the last dimension of the ArrayLike. |
|
applies a bandstop filter on the last dimension of the ArrayLike object. |
|
applies an highpass filter on the last dimension of the ArrayLike object. |
|
applies a lowpass filter on the last dimension of the ArrayLike. |
|
flips the elements of the ArrayLike object along its last dimension. |
|
changes the sign of all the elements of the input. |
|
returns the channel_map and the chan_net arguments for |
|
returns the coefficients a and b necessary to run filtering augmentations. |
|
returns the same array or tensor it was given. |
|
puts to zero random portions of the ArrayLike object. |
|
applies a moving average filter to the input ArrayLike object. |
|
permutes some portions of the ArrayLike object along its last dimension. |
|
permutes the ArrayLike object along the EEG channel dimension. |
|
Apply the phase swap data augmentation to the ArrayLike object. |
|
randomizes the phase of all signals in the input ArrayLike object. |
|
randomly scales the first derivative of x. |
|
rescales the ArrayLike object by a given amplitude. |
|
shifts the frequency components of the signals included in the ArrayLike object. |
|
Shifts temporally the elements of the ArrayLike object. |
|
adds a scalar value to the ArrayLike object. |
|
stretches and squeezes portions of the ArrayLike object. |