Closed dbhaskar92 closed 2 years ago
Thanks for the report! I'll defer to the Wasserstein authority on this.
Jumping on to @Eetion thanks, thanks for the report! I have had a look, and think I have managed to localise the issue (without knowing exactly what caused it yet), and have a beta fix. @dbhaskar92 if you are happy to test it, I can provide you with the (stripped back) fix.
If you look at my fork and commit 434e891 it should be resolved. Edited 15/09/2021: changed the commit reference above as there was an extra 's' at the bottom of the file in the previous commit.
hey @dbhaskar92 just hoping to give this a bump and see if you have continued to encounter issues.
@yossibokor No, I did not encounter any further issues in commit 434e891, thanks so much!
Great! Then we can close the issue @Eetion
Output of optimized code (commit a214726 onwards) depends on the order of arguments. To reproduce:
1) Generate data:
2) Compute barcodes:
3) Print Wasserstein distances:
On b38f8af (unoptimized version, note added by me)
On a214726
On master
julia> wasserstein_distance(barcode_1_H1, barcode_2_H1, p=2, q=2) 0.161803319206841
julia> wasserstein_distance(barcode_2_H1, barcode_1_H1, p=2, q=2) 0.11576837169320067 (NOTE: different from above, same as commit a214726)
Testing with other datasets, I found that
W(X,Y)
is close toW(Y,X)
in commit b38f8af or earlier , but significantly different in later versions.Can you please help me understand the discrepancy? I'm running Julia 1.6.2, happy to assist in testing/debugging the code :)