17
$\begingroup$

Suppose that I have two distance matrices for the same set of items. By a distance matrix I mean a square matrix whose (i,j)th entry holds the distance (in terms of cosine similarity) between ith and jth items. The ith and jth items are the same items in both matrices. Such a situation might happen when we gather information about a set of items from two different sources.

What I want to do is to compare these two distance matrices. Whether they are similar or not with respect to the distance relations among items.

One idea is to find the correlation between the elements of the two matrices (only the upper triangular elements since these are symmetric matrices). This can be done by Mantel's test.

Another thing comes to mind is to build clusters out of these distance matrices and compare the resultant two clusterings. But does this give any additional information over Mantel's test?

Can we use other measures to understand the similarity between these two distance matrices or the above two methods are enough?

To make things concrete, the items are documents. One set consists of wikipedia documents written in English and the other set consists of the same documents written in another language (say German). Documents are encoded as tf*idf vectors and their similarity values are measured using cosine similarity. So one distance matrix hold the similarities of the English documents and the other one holds the similarities of the German documents.

$\endgroup$
5
  • 6
    $\begingroup$ It's easy to come up with many different ways of quantifying "similar" in this context. It's hard to choose among them without knowing anything about why you seek to measure similarity, what you will conclude from the result, and what the possible consequences of an incorrect conclusion might be. It would also help immensely to have some kind of model, either physical or statistical, describing how differences between the matrices can arise. Could you perhaps share some of that kind of information with us? $\endgroup$
    – whuber
    Commented Mar 20, 2012 at 16:05
  • 1
    $\begingroup$ The items are documents. One set consists of wikipedia documents written in English and the other set consists of the same documents written in another language (say German). Documents are encoded as tf*idf vectors and their similarity values are measured using cosine similarity. So one distance matrix hold the similarities of the English documents and the other one holds the similarities of the German documents. I hope this is useful $\endgroup$ Commented Mar 20, 2012 at 19:05
  • $\begingroup$ Define a distance $d(A,B)=\|A-B\|$ using some suitable matrix norm $\|\cdot\|$, use it in your problem and see if the answers are meaningful. One possible norm is $\|A\|=\max_{1\leq j\leq n} \sum_{i=1}^m |a_{ij}|$. $\endgroup$
    – Zen
    Commented Mar 20, 2012 at 22:00
  • $\begingroup$ diagonalize, take the sum of the diagonal, compare averages. $\endgroup$
    – user318514
    Commented Aug 4, 2022 at 14:59
  • $\begingroup$ What about comparing two Dx and Dy distance matrices coming from different sets of points X and Y where |X|=|Y|? $\endgroup$
    – dawid
    Commented Sep 30, 2023 at 16:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.