pyeeg.cca.CCA_Estimator.transform
- CCA_Estimator.transform(transform_x=True, transform_y=False, comp=0)
Project the data onto the canonical components.
Applies the fitted canonical coefficients to the (lagged, saved) feature matrix
Xto obtain the canonical scores of the stimulus side. The response-side projection is currently not implemented (the corresponding code is commented out).- Parameters:
transform_x (bool, default: True) – Whether to project the stimulus features
Xonto the canonical components.transform_y (bool, default: False) – Whether to project the response
yonto the canonical components. Not currently implemented.comp (int, default: 0) – Index of the canonical component used for the projection when
transform_xis True.
- Returns:
Projected data: canonical scores of the (lagged) features, of shape (nsamples x nchans) – the result of
coefResponse_.T @ coefStim_.T @ X.- Return type:
ndarray