简体   繁体   中英

python covariance matrix returns a 2N,2N matrix instead of N,N?

I am using python to find the covariance matrix between 2 images, eg of size (N, N), but numpy.cov or numpy.corrcoef always returns a matrix of the size (2N, 2N), which I dont understand. Isn't a covariance matrix the same size of a N,N array?

As shown

The upper left square is the covariance within the first image. The bottom right square is the covariance within the second image. The other two squares are the covariance between the images; each should be the same as the other flipped about the main diagonal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM