emmi.modules.preprocessors.normalizers.mean_std_normalization

Classes

MeanStdNormalization

Normalizes data using mean and standard deviation. It shifts the data by subtracting the mean and scales it by dividing by the standard deviation.

Module Contents

class emmi.modules.preprocessors.normalizers.mean_std_normalization.MeanStdNormalization(normalizer_config, **kwargs)

Bases: emmi.modules.preprocessors.normalizers.shift_and_scale_normalizer.ShiftAndScaleNormalizer

Normalizes data using mean and standard deviation. It shifts the data by subtracting the mean and scales it by dividing by the standard deviation.

Parameters:
  • normalizer_config (ksuit.schemas.normalizers.normalizer_config.MeanStdNormalizerConfig) – Configuration containing mean and std values. Imports MeanStdNormalizerConfig.

  • **kwargs – Additional arguments passed to the parent class.

Raises:
  • ValueError – If mean and std do not have the same length.

  • ValueError – If any value in std is zero (to avoid division by zero).

  • ValueError – If any value in std is negative.

EPSILON = 1e-06
mean
std