Timeline for Is there a distance metric between ordered vectors?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 29 at 15:30 | history | edited | User1865345 | CC BY-SA 4.0 |
deleted 21 characters in body
|
Jun 25, 2020 at 6:41 | comment | added | Oren Matar | a = np.array([1,5,0,0,0,0,1]) b = np.array([1,0,5,0,0,0,1]) wasserstein_distance(a, b) [1] 0 And I was told this makes sense... I don't know the metric very well.. | |
Jun 24, 2020 at 17:34 | comment | added | Oren Matar | I'll check it out, Thank you, fyi, so far this stackoverflow.com/questions/48497756/… let me to the best solutions. The idea is simple - transform the data to cumsum and then use any distance metric. It's also the idea behind Kolmogorov–Smirnov test, which can be applied here as well. | |
Jun 24, 2020 at 14:12 | comment | added | cdalitz | Just an idea: I had the same problem of obtaining zero at the beginning, because I had not understand the interface: the data must be presentied in two columns (not rows!), with the index as the second column. Maybe you have inadvertantly created a transposed matrix? | |
Jun 24, 2020 at 14:10 | comment | added | cdalitz | Hm, I do not obtain 0 when I replace the 4 in B with a 5, but 0.857. Conceptually, the EMD assumes that the data has been normalized to sum up to one (in other words: the data represents distributions), but principlally the algorithm also works for non-normalized data. | |
Jun 24, 2020 at 14:03 | comment | added | Oren Matar | I tried it with the python implementation and it didn't do what I wanted... the EMD didn't seem to care about how far I have to move the 5. if you try emd when you replace the 4 in B with 5 for me it gave a 0 distance, and that's how I understand the metric... which isn't right either... | |
Jun 24, 2020 at 13:39 | history | answered | cdalitz | CC BY-SA 4.0 |