hypertools.tools.
procrustes
(source, target, scaling=True, reflection=True, reduction=False, oblique=False, oblique_rcond=-1, format_data=True)[source]¶Function to project from one space to another using Procrustean transformation (shift + scaling + rotation + reflection).
The implementation of this function was based on the ProcrusteanMapper in pyMVPA: https://github.com/PyMVPA/PyMVPA
See also: http://en.wikipedia.org/wiki/Procrustes_transformation
Array to be aligned to target’s coordinate system.
Source is aligned to this target space
Estimate a global scaling factor for the transformation (no longer rigid body)
Allow for the data to be reflected (so it might not be a rotation. Effective only for non-oblique transformations.
If true, it is allowed to map into lower-dimensional space. Forward transformation might be suboptimal then and reverse transformation might not recover all original variance.
Either to allow non-orthogonal transformation – might heavily overfit the data if there is less samples than dimensions. Use oblique_rcond.
Cutoff for ‘small’ singular values to regularize the
inverse. See lstsq
for more
information.
The array source is aligned to target and returned