hidimstat.group_reid

hidimstat.group_reid(X, Y, fit_Y=True, stationary=True, method='simple', order=1, eps=0.01, tol=0.0001, max_iter=10000, n_jobs=1, seed=0)

Estimation of the covariance matrix using group Reid procedure

Parameters:
Xndarray, shape (n_samples, n_features)

Data.

Yndarray, shape (n_samples, n_times)

Target.

fit_Ybool, optional (default=True)

If True, Y will be regressed against X by MultiTaskLassoCV and the covariance matrix is estimated on the residuals. Otherwise, covariance matrix is estimated directly on Y.

stationarybool, optional (default=True)

If True, noise is considered to have the same magnitude for each time step. Otherwise, magnitude of the noise is not constant.

methodstr, optional (default=’simple’)

If ‘simple’, the correlation matrix is estimated by taking the median of the correlation between two consecutive time steps and the noise standard deviation for each time step is estimated by taking the median of the standard deviations for every time step. If ‘AR’, the order of the AR model is given by order and Yule-Walker method is used to estimate the covariance matrix.

orderint, optional (default=1)

If stationary=True and method=AR, order gives the order of the estimated autoregressive model. order must be smaller than the number of time steps.

epsfloat, optional (default=1e-2)

Length of the cross-validation path. eps=1e-2 means that alpha_min / alpha_max = 1e-2.

tolfloat, optional (default=1e-4)

The tolerance for the optimization: if the updates are smaller than tol, the optimization code checks the dual gap for optimality and continues until it is smaller than tol.

max_iterint, optional (default=1e4)

The maximum number of iterations.

n_jobsint or None, optional (default=1)

Number of CPUs to use during the cross validation.

seed: int, optional (default=0)

Seed passed in the KFold object which is used to cross-validate LassoCV. This seed controls also the partitioning randomness.

Returns:
cov_hatndarray, shape (n_times, n_times)

Estimated covariance matrix.

beta_hatndarray, shape (n_features, n_times)

Estimated parameter matrix.

References

[1]

Chevalier, J. A., Gramfort, A., Salmon, J., & Thirion, B. (2020). Statistical control for spatio-temporal MEG/EEG source imaging with desparsified multi-task Lasso. In NeurIPS 2020-34h Conference on Neural Information Processing Systems.