theochem / procrustes

Python library for finding the optimal transformation(s) that makes two matrices as close as possible to each other.
https://procrustes.qcdevs.org/
GNU General Public License v3.0
109 stars 20 forks source link

2-sided Orthogonal Procrustes for Rectangular Matrices #49

Open PaulWAyers opened 3 years ago

PaulWAyers commented 3 years ago

In chapter 7.5.2 of Procrustes Problems by J. C. Gower and G. G. Dijksterhuis an algorithm for 2-sided orthogonal Procrustes is presented. This generalizes the current treatment, which requires that the matrices being matched be symmetric and square. This is also explained in section 3.3 of Pythagoras Papadimitriou's Ph.D. thesis at the Univ. of Manchester. papad93.pdf

Right now, the object is to find an orthogonal matrices, Q1 and Q2, such that || Q1 A Q2 - B || is minimized, where A and B are symmetric square matrices and have the same shape (i.e., both are mxm matrices). However, this reference shows that this can work even as long as A and B have the same shape; they need not be square or symmetric.

This could be an embellishment on the existing method (it contains the old method as a special case) or it could be implemented as a separate method. I'd tend to do the latter, and leave the easy case as a routine that can be used where applicable.