You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/aspire/operators/wemd.py
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,12 @@
2
2
Wavelet-based approximate Earthmover's distance (EMD) for n-dimensional signals.
3
3
4
4
This code is based on the following paper:
5
-
Sameer Shirdhonkar and David W. Jacobs. "Approximate earth mover’s distance in linear time." 2008 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
5
+
Sameer Shirdhonkar and David W. Jacobs.
6
+
"Approximate earth mover’s distance in linear time."
7
+
2008 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
6
8
7
-
More details are available in their technical report: CAR-TR-1025 CS-TR-4908 UMIACS-TR-2008-06.
9
+
More details are available in their technical report:
10
+
CAR-TR-1025 CS-TR-4908 UMIACS-TR-2008-06.
8
11
"""
9
12
10
13
importnumpyasnp
@@ -14,8 +17,9 @@
14
17
defwemd_embed(arr, wavelet, level):
15
18
"""
16
19
This function computes an embedding of Numpy arrays such that
17
-
for non-negative arrays that sum to one, the L1 distance between the resulting embeddings
18
-
is strongly equivalent to the Earthmover distance of the arrays.
20
+
for non-negative arrays that sum to one, the L1 distance between the
21
+
resulting embeddings is strongly equivalent to the Earthmover distance
0 commit comments