Determining the correlation between two matrices in an efficient manner

25 Views Asked by At

First time Mathematics poster, please go easy.

I have two matrices that have roughly 1 million values. I want to come up with some 'similarity' metric such that I can tell when X% of the values between the two matrices are correlated above Y% threshold or something like that.

So I could convert the matrices into two vectors and process the correlation as one would normally calculate the Pearson coef. However I suspect there is a better mathematical way to achieve what I want. Any thoughts?