Thursday, December 05, 2013

A note for later: efficient calculation of big covariance matrices

This answer is helpful. Now, this may not be the most efficient way to calculate the sample covariance of a large data frame, but it's a fairly well-optimized (all BLAS) and fairly easy method which avoids the numerical difficulties of the various naive methods. Then, say, if you want to decorrelate, DPOTRF and DTRTRI or something will get you the proper matrix.

No comments: