pyriemann.utils.covariance.covariances¶
- pyriemann.utils.covariance.covariances(X, estimator='cov', **kwds)¶
Estimation of covariance matrices.
Estimates covariance matrices from multi-channel time-series according to a covariance estimator. It supports real and complex-valued data.
- Parameters:
- Xndarray, shape (n_matrices, n_channels, n_times)
Multi-channel time-series, real or complex-valued.
- estimatorstring | callable, default=”cov”
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],
“mcd” for minimum covariance determinant matrix [mcd],
“oas” for oracle approximating shrunk covariance matrix [oas],
“sch” for Schaefer-Strimmer shrunk covariance matrix [sch],
“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”.
For “lwf”, “mcd”, “oas” and “sch” estimators, complex covariance matrices are estimated according to [comp].
- **kwdsdict
Any further parameters are passed directly to the covariance estimator.
- Returns:
- covmatsndarray, shape (n_matrices, n_channels, n_channels)
Covariance matrices.
References
[comp]Enhanced Covariance Matrix Estimators in Adaptive Beamforming R. Abrahamsson, Y. Selen and P. Stoica. 2007 IEEE International Conference on Acoustics, Speech and Signal Processing, Volume 2, 2007.