denspp.offline.data_augmentation.downsampler#
Module Contents#
Functions#
Function for data augmentation using downsampling. |
API#
- denspp.offline.data_augmentation.downsampler.augmentation_downsampling(data: numpy.ndarray, label: numpy.ndarray, n_downsampling: int, drop_samples: bool = False) tuple[numpy.ndarray, numpy.ndarray][source]#
Function for data augmentation using downsampling.
- Parameters:
data – Numpy array with data from dataset with shape [num_samples, num_ch (optional), num_timepoints]
label – Numpy array with labels from dataset with shape [num_samples, ]
n_downsampling – Integer with level for downsampling (0: error, 1: no change, 2: reduced by 2, 3: reduced by 3, …)
drop_samples – Boolean, whether to drop samples (true) or augment samples (false)
- Returns:
Tuple with data and label for the new augmented dataset using downsampling.