pyeeg.preprocess.covariance
- pyeeg.preprocess.covariance(X, estimator='cov')
Estimation of one covariance matrix on the whole dataset. If X is of shape (trials, samples, channels) Will concatenate all trials together to compute a single covariance matrix across all of them.
- Parameters:
X (ndarray (nsamples, nchannels) or (ntrials, nsamples, nchannels)) – Input data. If 3d, all trials are concatenated along the sample dimension before estimating the covariance.
estimator (str or callable) – One of the covariance estimators understood by
_check_est()('cov','scm','lwf','oas','mcd','corr') or a callable returning a covariance matrix.
- Returns:
C – The estimated covariance matrix.
- Return type:
ndarray (nchannels, nchannels)