Search code examples
spatialspatstatr-ppp

Clarifying output of the pppdist function in spatstat


I was hoping for a way to compare similarity between point patterns and came across the Wasserstein distance metric. In searching for a way to calculate this and explore futher with my data, I came across the pppdist function in spatstat. From a read of the function description, it looks like it can compute an approximation of a range of different distance metrics including the Prohorov distance [maximum distance between matched points], minimum averaged distance between points, and the wasserstein distance which is a measure of the work needed to transform one point pattern into another.

It seems per the documentation, the way to alter the approximated distance output is by changing the q parameter - the inverse of the power applied to the sum of distances between matched points. If q is less than 1, the output is some order of the wasserstein distance. Am I understanding that correctly? So q = 0.1 would return the 1st order Wasserstein distance; q = 0.2 would return the 2nd order and so on?


Solution

  • The second order Wasserstein distance would be obtained by setting q=2, third order is q=3 and so on. For example order q=2 means that you are calculating the sum of squared distances and then taking the square root afterwards.