Hello all, I am performing regularized CCA and I have noticed a difference in the correlation between the scores and the correlation values returned by the function output (often somewhat small).
If CANCOR_object is created by running CCA::rcc(X,Y,.1,.2) then:
CANCOR_object$cor[1] is not equal to:
cor(CANCOR_object$scores$xscores[,1],CANCOR_object$scores$yscores[,1])
My understanding of CCA is that the canonical correlation is the Pearson correlation between the scores for X and Y. Could you help explain this discrepancy? Thank you all.
The functions should be very similar given that they were originated by the same developers (excluding myself) . Given the same regularisation parameters, I would say that perhaps the difference is in the way we solve the eigen problem (with SVD in mixOmics, see line 257 and below in https://github.com/mixOmicsTeam/mixOmics/blob/master/R/rcc.R) . In theory, yes, it would be the Pearon correlation coefficient between the scores, in practice it boils down to the singular value.
Thank you. Based on tune.rcc.R https://github.com/mixOmicsTeam/mixOmics/blob/master/R/tune.rcc.R (line 140) it seems that for testing data in cross validation that Pearson correlation coefficient between scores in used to determine canonical correlation in testing data?