NaiveNormalize

class torch_ecg._preprocessors.NaiveNormalize(mean: Real | ndarray = 0.0, std: Real | ndarray = 1.0, per_channel: bool = False, **kwargs: Any)[source]

Bases: Normalize

Naive normalization.

Naive normalization defined as

\[\frac{sig - m}{s}\]
Parameters:

Examples

from torch_ecg.cfg import DEFAULTS
sig = DEFAULTS.RNG.randn(1000)
pp = NaiveNormalize()
sig, _ = pp(sig, 500)
extra_repr_keys() List[str][source]

Extra keys for __repr__() and __str__().