Closed kaiusgs closed 3 years ago
Sorry for my late reply. The data used for MAD should be centralized, so the code uses the center_X and center_Y rather than X and Y. And accordion to the formula of CCA, I don't think the eigenvector_Y should be divided with eigenvalue. Because eigenvector_Y is solved according to its relation with eigenvector_X, like the following: [image: image.png] [image: image.png] You can refer to the original MATLAB implementation by Nilsen ( http://www.imm.dtu.dk/~alan/software.html).
On Wed, Apr 21, 2021 at 5:12 PM Chenkai @.***> wrote:
In irmad.py, line 51: eigenvector_Y = np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) # the eigenvector of image Y I suppose the eigenvector of image Y should be divided by the eigenvalue, according to equations in the common way of solving CCA. eigenvectorY =np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) /eigenvalue Am I wrong or it's an error in code ? And in line 59: mad_variates = np.dot(eigenvector_X.T, center_X) - np.dot(eigenvector_Y.T, center_Y) # (6, width * height) I was wondering why center_X and center_Y rather than X and Y are used to calculate the MAD. Hope for your reply, and I'll be very thankful.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/I-Hope-Peace/ChangeDetectionRepository/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQFWQ7NTZIDFV6OAFFQPLJDTJ2JHBANCNFSM43J6AJFA .
In irmad.py, line 51:
eigenvector_Y = np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) # the eigenvector of image Y
I suppose the eigenvector of image Y should be divided by the eigenvalue, according to equations in the common way of solving CCA.eigenvector_Y_ =np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) /eigenvalue
Am I wrong or it's an error in code ? Hope for your reply, and I'll be very thankful.