-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to understand the recall@K in your code? #21
Comments
It suddenly dawned on me that the similarity here refers to the similarity between the inner line and the outlier. If the outlier is large, the prediction will be wrong |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mscottml
First of all thank you for sharing the code, this is really great work.
I ran the experiment and got good results, but I can't understand the implementation of computational recall @ K in your code. Can you explain it to me? The two bold lines are shown below.
`def recall_k(self, k=1):
m = len(self.sim_mat)
match_counter = 0
for i in range(m):
pos_sim = self.sim_mat[i][self.gallery_labels == self.query_labels[i]]
neg_sim = self.sim_mat[i][self.gallery_labels != self.query_labels[i]]
thresh = np.sort(pos_sim)[-2] if self.is_equal_query else np.max(pos_sim)
Thank you!
The text was updated successfully, but these errors were encountered: