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, .