| greedymatch {singR} | R Documentation |
Greedy Match
Description
Greedy Match matches a column of Mx and My by minimizing chordal distance between vectors,
removes the matched columns and then finds the next pair.
This equivalent to maximizing absolute correlation for data in which each column has mean equal to zero.
Returns permuted columns of Mx and My. This function does not do any scaling or sign flipping.
For this matching to coincide with angle matching, the columns must have zero mean.
Usage
greedymatch(Mx, My, Ux, Uy)
Arguments
Mx |
Subject Score for X with n x n.comp.X matrix |
My |
Subject Score for Y with n x n.comp.Y matrix |
Ux |
Matrix with n.comp x n, Mx = Lx^-1 %*% t Ux, Lx is the whitener matrix of dX. |
Uy |
Matrix with n.comp x n, My = Ly^-1 %*% t Uy, Ly is the whitener matrix of dY. |
Value
a list of matrices:
MxColumns of original Mx reordered from highest to lowest correlation with matched component in My
MyColumns of original My reordered from highest to lowest correlation with matched component in Mx
UxPermuted rows of original Ux corresponds to MapX
UyPermuted rows of original Uy corresponds to MapY
correlationsa vector of correlations for each pair of columns in permuted Mx and M
mapXthe sequence of the columns in original Mx.
mapYthe sequence of the columns in original MY.