pyriemann.utils.covariance.covariance_sch

pyriemann.utils.covariance.covariance_sch(X)

Schaefer-Strimmer shrunk covariance estimator.

Shrinkage covariance estimator [1]:

\[C = (1 - \gamma) C_\text{scm} + \gamma T\]

where \(T\) is the diagonal target matrix:

\[T[i,j] = \{ C_\text{scm}[i,i] \ \text{if} i = j, 0 \text{otherwise} \}\]

Note that the optimal \(\gamma\) is estimated by the authors’ method.

Parameters:
Xndarray, shape (n_channels, n_times)

Multi-channel time-series, real-valued.

Returns:
covndarray, shape (n_channels, n_channels)

Schaefer-Strimmer shrunk covariance matrix.

Notes

New in version 0.3.

References

[1]

A shrinkage approach to large-scale covariance estimation and implications for functional genomics J. Schafer, and K. Strimmer. Statistical Applications in Genetics and Molecular Biology, Volume 4, Issue 1, 2005.