Skip to content
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

can you explain how to decrease positions of positives in cirtorch.utils.evaluate? #49

Open
wangqi12332155 opened this issue Sep 20, 2019 · 0 comments

Comments

@wangqi12332155
Copy link

wangqi12332155 commented Sep 20, 2019

Your working is really great! It help me a lot. When I calculated the MAP through your code, I found a problem. In cirtorch.utils.evaluate.py, you define a function:

def compute_map(ranks, gnd, kappas=[]):
......
k = 0;
ij = 0;
if len(junk):
# decrease positions of positives based on the number of
# junk images appearing before them
ip = 0
while (ip < len(pos)):
while (ij < len(junk) and pos[ip] > junk[ij]):
k += 1
ij += 1
pos[ip] = pos[ip] - k
ip += 1
.......
In this code from line 83 in evaluate.py, why do you reset the k=0 and ij=0 in the "while(ip < len(pos))"? In my opinion, if we do not reset k and ij, it may not be reasonable. Can you explain the reason? Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant