expt: Trying Wasserstein

This commit is contained in:
Manos Katsomallos 2021-10-06 18:25:08 +02:00
parent cec738d5cf
commit 192c6b8caf
4 changed files with 5 additions and 5 deletions

View File

@ -144,7 +144,7 @@ def main(args):
# # Show plot # # Show plot
# plt.show() # plt.show()
# Save plot # Save plot
lmdk_lib.save_plot(path + '-sel.pdf') lmdk_lib.save_plot(path + '-sel-emd.pdf')
print('[OK]', flush=True) print('[OK]', flush=True)

View File

@ -134,7 +134,7 @@ def main(args):
# Show plot # Show plot
# plt.show() # plt.show()
# Save plot # Save plot
lmdk_lib.save_plot(path + '-sel.pdf') lmdk_lib.save_plot(path + '-sel-emd.pdf')
print('[OK]', flush=True) print('[OK]', flush=True)

View File

@ -155,7 +155,7 @@ def main(args):
# Show plot # Show plot
# plt.show() # plt.show()
# Save plot # Save plot
lmdk_lib.save_plot(path + '-sel.pdf') lmdk_lib.save_plot(path + '-sel-emd.pdf')
print('[OK]', flush=True) print('[OK]', flush=True)

View File

@ -175,8 +175,8 @@ def get_opts_from_top_h(seq, lmdks):
hist_tmp = np.copy(hist_cur) hist_tmp = np.copy(hist_cur)
hist_tmp[i] += 1 hist_tmp[i] += 1
# Find difference from original # Find difference from original
diff_cur = get_norm(hist, hist_tmp) # Euclidean # diff_cur = get_norm(hist, hist_tmp) # Euclidean
# diff_cur = get_emd(hist, hist_tmp) # Wasserstein diff_cur = get_emd(hist, hist_tmp) # Wasserstein
# Remember if it is the best that you've seen # Remember if it is the best that you've seen
if diff_cur < diff_min: if diff_cur < diff_min:
diff_min = diff_cur diff_min = diff_cur