pytorch-metric-learning icon indicating copy to clipboard operation
pytorch-metric-learning copied to clipboard

Add nearest-centroid accuracy as a default metric for AccuracyCalculator

Open KevinMusgrave opened this issue 5 years ago • 1 comments

  • Compute centroid of each class in the reference set
  • Find nearest centroid for each query embedding. It gets a score of 1 if the nearest centroid is the correct class, and 0 otherwise.

KevinMusgrave avatar Sep 25 '20 01:09 KevinMusgrave

Implemented in this reply: https://github.com/KevinMusgrave/pytorch-metric-learning/issues/342#issuecomment-922015792

KevinMusgrave avatar Sep 17 '21 19:09 KevinMusgrave