pyriemann.utils.covariance.covariances

pyriemann.utils.covariance.covariances(X, estimator='cov', **kwds)

Estimation of covariance matrix.

Parameters:
Xndarray, shape (n_matrices, n_channels, n_times)

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

estimator{‘corr’, ‘cov’, ‘hub’, ‘lwf’, ‘mcd’, ‘oas’, ‘sch’, ‘scm’, ‘stu’, ‘tyl’}, default=’scm’

Covariance matrix estimator [est]:

  • ‘corr’ for correlation coefficient matrix [corr],

  • ‘cov’ for NumPy based covariance matrix [cov],

  • ‘hub’ for Huber’s M-estimator based covariance matrix [mest],

  • ‘lwf’ for Ledoit-Wolf shrunk covariance matrix [lwf] only for real-valued inputs,

  • ‘mcd’ for minimum covariance determinant matrix [mcd] only for real-valued inputs,

  • ‘oas’ for oracle approximating shrunk covariance matrix [oas] only for real-valued inputs,

  • ‘sch’ for Schaefer-Strimmer shrunk covariance matrix [sch] only for real-valued inputs,

  • ‘scm’ for sample covariance matrix [scm],

  • ‘stu’ for Student-t’s M-estimator based covariance matrix [mest],

  • ‘tyl’ for Tyler’s M-estimator based covariance matrix [mest],

  • or a callable function.

For regularization, consider ‘lwf’ or ‘oas’. For robustness, consider ‘hub’, ‘mcd’, ‘stu’ or ‘tyl’.

**kwdsdict

Any further parameters are passed directly to the covariance estimator.

Returns:
covmatsndarray, shape (n_matrices, n_channels, n_channels)

Covariance matrices.

References