pyeeg.mcca.mCCA
- class pyeeg.mcca.mCCA(n_components=None)
Class to support mCCA computation on a set of data matrices. Typically N data matrices, with SAME number of samples (observations) but possibly different number of channels (features). A typical use case would be to find common source of activity within each matrix, for instance where they carry EEG data for individual subject, and one wants to denoise the EEG data by projecting each subject’s EEG into a space where they share a common response. The projection matrices will be per individual.
- Parameters:
n_components (int, optional) – Number of components to keep in the whitening PCA applied to each dataset. Defaults to
None(all components are kept).
- SCs_
Summary components: the principal components of the concatenated whitened datasets, i.e. the shared common response across datasets.
- Type:
ndarray (nsamples x n_components)
- SC_variances
Explained variance of each summary component.
- Type:
ndarray
- individual_transforms_
Per-dataset projection matrices mapping each dataset into the shared canonical space. One matrix per fitted dataset.
- Type:
list of ndarray
- fit()
- canonical_correlate_single()
- denoise()
References
De Cheveigné et. al, MCCA of brain signals, 2018, biorXiv
Methods
mCCA.canonical_correlate_single(X, idx)Project one single dataset into its canonical correlate components.
mCCA.denoise(X, num_comps, idx)Denoise a dataset by projecting onto its low-rank canonical space.
mCCA.fit(X)Fit the mCCA model on a set of datasets.
Get metadata routing of this object.
mCCA.get_params([deep])Get parameters for this estimator.
Plot the variance of each summary component.
mCCA.set_params(**params)Set the parameters of this estimator.