Skip to content

Commit

Permalink
Fix metrics for sift-256-hamming and word2bits-800-hamming
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Apr 6, 2024
1 parent 3e3e269 commit 0d96488
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,15 @@ def inv_fun(x):
args.output = "results/%s.png" % (args.dataset + ("-batch" if args.batch else ""))
print("writing output to %s" % args.output)

dataset, _ = get_dataset(args.dataset)
dataset, dimension = get_dataset(args.dataset)
count = int(args.count)
unique_algorithms = get_unique_algorithms()
results = load_all_results(args.dataset, count, args.batch)
linestyles = create_linestyles(sorted(unique_algorithms))
runs = compute_metrics(np.array(dataset["distances"]), results, args.x_axis, args.y_axis, args.recompute)
dataset_distances = np.array(dataset["distances"])
if args.dataset == "sift-256-hamming" or args.dataset == "word2bits-800-hamming":
dataset_distances *= dimension
runs = compute_metrics(dataset_distances, results, args.x_axis, args.y_axis, args.recompute)
if not runs:
raise Exception("Nothing to plot")

Expand Down

0 comments on commit 0d96488

Please sign in to comment.