Shortcuts

Normalize

class torcheeg.transforms.Normalize(min: float | None = None, max: float | None = None, mean: float | None = None, std: float | None = None)[source][source]

Normalize the label using min-max normalization or standardization.

For min-max normalization: .. code-block:: python

from torcheeg import transforms

t = transforms.Normalize(min=0.0, max=1.0) t(y=0.5)[‘y’] >>> 0.5

For standardization: .. code-block:: python

from torcheeg import transforms

t = transforms.Normalize(mean=0.0, std=1.0) t(y=0.5)[‘y’] >>> 0.5

Parameters:
  • min (float, optional) – Minimum value for min-max normalization. Default: None

  • max (float, optional) – Maximum value for min-max normalization. Default: None

  • mean (float, optional) – Mean value for standardization. Default: None

  • std (float, optional) – Standard deviation value for standardization. Default: None

Note

Either (min, max) or (mean, std) should be provided, but not both.

__call__(*args, **kwargs) Dict[str, any][source]

Call self as a function.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources