Augmentations

class doc_octopy.datasets.filters.emg_augmentations.GaussianNoise(target_snr__db=5.0, input_is_chunked=None, is_output=False)[source]

Bases: EMGAugmentation

Adds Gaussian noise to the input EMG data. This augmentation is based on the paper [1]_

Parameters:
  • target_snr__db (float, optional) – The target signal to noise ratio in decibels, by default 5.0.

  • input_is_chunked (bool) – Whether the input is chunked or not.

  • is_output (bool) – Whether the filter is an output filter. If True, the resulting signal will be outputted by and dataset pipeline.

__call__(chunk: numpy.ndarray) numpy.ndarray

Augments the chunk.

Notes

class doc_octopy.datasets.filters.emg_augmentations.MagnitudeWarping(nr_of_point_for_spline=6, gaussian_mean=1.0, gaussian_std=0.35, nr_of_grids=None, input_is_chunked=None, is_output=False)[source]

Bases: EMGAugmentation

Magnitude warping augmentation. This augmentation is based on the paper [1]_

Parameters:
  • nr_of_point_for_spline (int, optional) – The number of points to use for the spline, by default 6.

  • gaussian_mean (float, optional) – The mean of the Gaussian distribution, by default 1.0.

  • gaussian_std (float, optional) – The standard deviation of the Gaussian distribution, by default 0.35.

  • nr_of_grids (int, optional) – The number of grids to use, by default 5.

  • input_is_chunked (bool) – Whether the input is chunked or not.

  • is_output (bool) – Whether the filter is an output filter. If True, the resulting signal will be outputted by and dataset pipeline.

__call__(chunk: numpy.ndarray) numpy.ndarray

Augments the chunk.

Notes

class doc_octopy.datasets.filters.emg_augmentations.WaveletDecomposition(b=0.25, wavelet='db7', level=5, nr_of_grids=None, input_is_chunked=None, is_output=False)[source]

Bases: EMGAugmentation

Wavelet decomposition augmentation. This augmentation is based on the paper [1]_

Parameters:
  • b (float, optional) – The scaling factor, by default 0.25.

  • wavelet (str, optional) – The wavelet to use, by default “db7”.

  • level (int, optional) – The level of decomposition, by default 5.

  • nr_of_grids (int, optional) – The number of grids to use, by default 5.

  • input_is_chunked (bool) – Whether the input is chunked or not.

  • is_output (bool) – Whether the filter is an output filter. If True, the resulting signal will be outputted by and dataset pipeline.

__call__(chunk: numpy.ndarray) numpy.ndarray

Augments the chunk.

Notes