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
114 stars 21 forks source link

An Eigenvalue-Based Method for the Unbalanced Orhtogonal Procrustes Problem #32

Open FanwangM opened 3 years ago

FanwangM commented 3 years ago

In our implementations, when two input matrices have different shapes (unbalanced), zero-padding is used to make them balanced. An alternative method is proposed in a recent SIAM paper,

LH Zhang, WH Yang, C Shen, J Ying, SIAM J. Matrix Anal. Appl., 41(3), 957–983..

In this paper, they showed that the orthogonal Procrustes can be transformed into an eigenvalue minimization problem, in which an adapted self-consistent field (SCF) iteration is used to solve the problem.

We can leave this for future implementation. Anyone interested to implement the algorithm is also welcome!

PaulWAyers commented 3 years ago

The goal of this issue is to generalize the (one-sided; single) Procrustes problem to treat matrices that are not the same shape. Right now, the object is to find an orthogonal matrix, Q, such that || A Q - B || is minimized, where A and B are have the same shape (i.e., both are mxn matrices). However, this paper shows that this can work even as long as A and B have the same number of rows. I.e., A can be mxn and B can be m x p.

I would prefer to implement this as a flag, so that either zero-padding (default option) or this (plus possible zero-padding of rows) can be used.