Distance between patterns of points

222 Views Asked by At

I was thinking of the following problem: Imagine I am given two lists of points on a 2D plane. These lists have the same size, i.e. both lists have the same number of points.

Now, I want to be able to compare these two patterns of points. How could I do that mathematically/statistically?

My try

I calculated the distance (Euclidean) from each point to every other point (pairwise distance). Then, I've ordered these distances. After that, I pick the first pair which will be the distance between two points a and b. At this point, I will ignore any other distance containing a or b (if a is in the first pattern and b in the second pattern). Thus at the end I will have a "matching" that creates a minimum weight match.

Finally, I just sum up these distances and this is my distance coefficient.

Any other ideas?

An example Suppose I have: $[ (0,0), (0,1), (1,0), (1,1)]$ and $[(0,0), (2,1), (0,1), (1,0)]$ and $[(2,3), (2,0), (0,0), (0,2)]$

These are three different patterns of points. I want to assess how similar they are. pattern1

pattern2

pattern3

How similar are they? Which are the most similar pairs? I want to answer questions like these.

1

There are 1 best solutions below

3
On

The first idea which came to my head was Hausdorff distance.

If you are interested in the similarity not of the placements of the points of the given sets (say $A$ and $B$), but only of their patterns (which are invariant with respect to isometries of the plane), you can use the counterparts of $\ell_p$-metric with $1\le p\le\infty$ (most popular values of $p$ are $1$, $2$, and $\infty$)

$$d(A,B)=\min_\sigma \left(\sum_{a,a’\in A} |d(a,a’)-d(\sigma(a),\sigma(a’))|^p \right)^{1/p},$$

where the minimum is taken with respect to all bijections $\sigma$ between the sets $A$ and $B$. The power $1/p$ is taken with hope to assure the trinagle inequality

$$ d(A,B)\le d(A,C)+ d(C,B).$$