pyriemann.utils.covariance.covariance_scm

pyriemann.utils.covariance.covariance_scm(X, *, assume_centered=False)

Sample covariance estimator.

Sample covariance estimator, re-implementing empirical_covariance of scikit-learn [1], but supporting real and complex-valued data.

Parameters:
Xndarray, shape (n_channels, n_times)

Multi-channel time-series, real or complex-valued.

assume_centeredbool, default=False

If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not exactly zero. If False, data will be centered before computation.

Returns:
covndarray, shape (n_channels, n_channels)

Sample covariance matrix.

Notes

New in version 0.6.

References