Transforms#
coco_pipe.transforms contains reusable scikit-learn-compatible data
transformers for subject structure in vectors, token representations, and
temporal trajectories.
The public registry exposes four methods:
Registry name |
Class |
Input |
Main operation |
|---|---|---|---|
|
|
|
Erase the directions in which subjects differ most |
|
|
|
Center every subject |
|
|
|
Center and whiten every subject |
|
|
|
Recenter each subject’s token covariances and project to tangent space |
ea_mean, ea_coral and ra recenter every subject, so they remove labels that
are constant within a subject (a diagnosis, age); leace is learned on training
subjects and can keep such a label (see the guide).
Each also has a label (Leace, EaMean, EaCoral, Ra; EaMeanCh and
EaCoralCh with channel_axis), which
write_transformed_embeddings() adds to the label of the
embedding files it writes.
Temporal trajectories also support participant-specific PCA plus orthogonal Procrustes alignment:
Class |
Input |
Main operation |
|---|---|---|
|
|
Rotate each participant’s PCA trajectories toward a training template |
See Subject alignment for the vector/token methods and Temporal trajectory alignment for temporal decoding.