ZscoreScaler

class selfeeg.utils.utils.ZscoreScaler(axis: int = -2, correction: int = 1)[source]

zscore operator callable objects.

It can accept both torch Tensors and numpy arrays. In case of torch Tensors are passed during call, torch_zscore is called.

Parameters:
  • x (ArrayLike) – The ArrayLike object to standardize.

  • axis (int) –

    The axis along which to operate. By default, it assumes that the EEG channel dimension is the second to last. If the tensor has only one dimension, default value is changed to 0.

    Default = -2

  • correction (int) –

    difference between the sample size and sample degrees of freedom. It is applied during the calculation of the standard deviation. It is equivalent to the Scipy’s zscore ddof argument. Default is Bessel’s correction as used in Pytorch’s std function.

    Default = 1