Correlation in a matrix between two matrices

enter image description here

Hi,

  • I would like to create a correlation matrix between the two datasets presented above that will ignore any occurrences of zeros (green in the picture above), does anyone know what is the most efficient way that will produce a smooth result?

  • Is there any correlation method that can identify a point of similarity by points and in this way the results will have the "shape" of the original matrix?

thank u

Note: I do not have matlab statistical tools

+5
source share
2 answers
2. Is there any correlation method that can identify the similarity point by 
   point  and by thus the results will have the "shape" of the original matrix?

, , . , A B. A B. , [0, Q], Q (Q == 1 Q == 255 Matlab).

d = |a - b|. [0, 1], . Matlab:

S = 1 - abs(A - B) / Q;

. , , . - , :

S(A == 0 | B == 0) = 0;

, undefined NaN:

S(A == 0 | B == 0) = nan;

, , 10 11 , 100 110. a + b ( )

D = abs(A - B) ./ (A + B)
S = 1 - D / max(D(:));

, . , : alpha (, alpha = 1e-6), : D = abs(A - B) ./ (alpha + A + B).

- D " ", ..

D = abs(A - B) ./ (A + B)
D(A == 0 | B == 0) = nan;
S = 1 - D / max(D(:));

, .

1. I would like to create a correlation matrix [...]

, . m x m, m^2. m^2 x m^2, . ( ). , .

. 1 x m .

, m x m m x m, .

+5

, corr2. :

r = corr2(A,B)

r A B, A B - . r .

, , corr(A(:), B(:)).

0

All Articles