I know the thread Measures of similarity or distance between two covariance matrices, which focuses moustly on L2
norm.
My signals are from the L2 vector space, it is guaranteed in Fig. 2.
Fig. 1 is then again about the original measurement data. I think two situations here
- compare values in Cor matrix where its units come from L2 vector space but have also polynomial description which precise definition is about unknown
- compare two Cor matrix where Matrix 1 is from unknown norm, while signals of Matrix 2 come for sure from L2 vector space
I want to know how Cor Matrix 2 is different from Cor Matrix 1. I want to validate both matrices are about the same measurement situation; they are but the detection is better in Fig. 2 but systematic studies not done so not sure. I would like to know how much correlations have decreased and increased between the two matrices.
Fig. 1 Matrix 1 of original signals, Fig. 2 Matrix 2 is about improved detection so much higher detection of details in theory - - but can it be true in statistics?
Example code files it takes the second first column of data in the files
ids <- c(1,2,3,4,5)
# files [, 1] - 1D signals
M <- cor(sapply(files, function(x) x[, 1]))
makeMatrixPlot(M, ids)
makeMatrixPlot <- function(Matrix, ids) {
# http://stackoverflow.com/a/40329062
Matrix %>%
as.data.frame() %>%
rownames_to_column(var = "Var1") %>%
as_data_frame() %>%
gather(key = Var2, value = Value, -Var1) %>%
ggplot(
aes(
x = reorder(Var1, as.numeric(gsub("V", "", Var1))),
y = reorder(Var2, as.numeric(gsub("V", "", Var2))),
fill = Value
)
) +
scale_x_discrete(labels = ids) +
scale_y_discrete(labels = ids) +
geom_tile() +
theme_bw() +
theme(
axis.text.x = element_text(angle = 90, size = 5, hjust = 1),
axis.text.y = element_text(size = 5)
) +
xlab("Variable 1") +
ylab("Variable 2")
}
Things already done
Absolute value studies
- substraction in both directions:
A-B
andB-A
; abs(A - B)
;
- substraction in both directions:
Relative value studies
iterated all these with
gradient2d
with emphasizes the differencens.+ scale_fill_gradient2() # http://stackoverflow.com/a/26179065/54964
OS: Debian 8.5
Linux kernel: 4.6 backports
R: 3.1.1
Mathematica: 11.0.1
MATLAB: 2016b