multiaug.augmenters.tabular package

Submodules

multiaug.augmenters.tabular.gaussian_perturbation module

class multiaug.augmenters.tabular.gaussian_perturbation.GaussianPerturbation(method: str = 'variance', fraction: float = 0.1)

Bases: multiaug.augmenters.meta.Augmenter

Apply featurewise Gaussian noise to each feature in a sample.

Parameters:
  • method (str) –

    Method to use to determine the noise (currently variance is the only supported method).

    • If ‘variance’ then the noise is determined by taking a fraction of the variance (across the individual features) for each feature and adding it the the original feature.
  • fraction (float) – Fraction of noise to add to sample.
apply(data: numpy.ndarray, row_ids: numpy.ndarray)

Apply the augmentation to the samples.

Parameters:
  • data (np.ndarray) – Entire dataset such that the noise can be determined relative to the entire dataset.
  • row_ids (np.ndarray) – The indices of the samples to which to apply noise.
Returns:

Augmented data

Return type:

np.ndarray

Module contents