Compare two matrices of origin-destination matrix for similarity/distance

692 Views Asked by At

I would like to measure how similar (or different) two matrices are. I know there are many different ways to do this, and the application determines the best one. This is where the tricky part comes in that I cannot figure out.

The matrices I am comparing are origin-destination matrices that estimate the number of people that flow between origin-destination pairs.

For example,

           Destination 1    Destination 2
Origin 1              20              100  
Origin 2             100                5

Over a given time period, 20 people travel from Origin 1 to Destination 1, and 100 people from Origin 1 to Destination 2. And so on.

When comparing two of these matrices to see if they are essentially equivalent, origin-destination pairs with higher volumes are more important. Therefore, simple difference measures like an average percent difference between two matrices produce skewed results. For example, the following almost equivalent origin-destination matrices,

A = [ 1  100
      5    5 ]

B = [ 0  101
      0    1 ]

has an average percent difference of ~70%. Elements [i=1,j=1] and [i=2,j=1] have a difference of 100%, but for this application these elements have little importance. Same goes for [i=2,j=2]. Real life origin-destination matrices are sparse, and so zero-to-small-number counts occur a lot.

Is there a method for comparing matrices that takes into account the scale of the elements? The suggestions listed here don't account for this (I believe).