pyeeg.preprocess.Whitener.cov

Whitener.cov(data, axis=None)

Estimate the covariance matrix of data and store it in self.sigma.

The covariance is computed as data.T @ data scaled by the number of samples (optionally debiased by one when self.bias is False).

Parameters:
  • data (ndarray) – Input data. Typically centered (see demean()).

  • axis (int, optional) – Axis along which samples run. If None, self.axis is used. The data are transposed so that samples run along axis 0.

Returns:

sigma – The estimated covariance matrix.

Return type:

ndarray (nchannels, nchannels)