Procrustes Transform of Rectangular matrix

.transform_procrustes(X, target, translation = TRUE, scale = TRUE)

Arguments

X

dense matrix to transform

target

dense matrix that is the target of the transform

translation

boolean; whether positions should be translated

scale

boolean; whether positions should be scaled

Value

returns a list of four elements:

  1. the transformed matrix Xstar

  2. the rotation matrix R

  3. the translation vector t_vec

  4. the scaling factor sigma

The transformed matrix Xstar can be recreated by the equation sigma * X * R if translation is FALSE. If translation is TRUE, adding t_vec to each row of the matrix sigma * X * R completes the transformation.