Open f-izzat opened 1 month ago
Here's an example of where, for each embedding in query
, it finds the nearest 5 neighbors in reference
, computes some accuracy metric, and returns the average.
ac = AccuracyCalculator(include=("mean_average_precision",), k=5)
results = ac.get_accuracy(query, query_labels, reference, reference_labels)
print(results["mean_average_precision"])
If your query
and reference
are the same set, you can just pass in query
:
results = ac.get_accuracy(query, query_labels)
AccuracyCalculator
, If i were to want to evaluate the model in retrieving the top 5 similar faces to the query?Some examples in how the AccuracyCalculator could be used would be much appreciated
Thanks