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

Calculation of average precision #2

Open
tshu-w opened this issue Jan 22, 2023 · 1 comment
Open

Calculation of average precision #2

tshu-w opened this issue Jan 22, 2023 · 1 comment

Comments

@tshu-w
Copy link

tshu-w commented Jan 22, 2023

According to the definition of average precision from wikipedia or sklearn, AP computes the average value of p(r) over the interval from r=0 to r=1, i.e., the area under precision-recall curve.

cc693ba3c12eb8968ce6ebec3c9ede84e14bd0e3

However, the following code calculates the mean of precision directly, i.e., the area under p-k curve.

map_sum = 0
for k in range(0, max_k):
map_sum += precision_array[k]
mean_avg_pr = map_sum/max_k
print("The mean average precision is:", mean_avg_pr)

I believe that this may not affect the overall trend of the different methods and the contribution of this paper, just a friendly reminder :)

@tshu-w tshu-w changed the title Calculation of average accuracy Calculation of average precision Jan 22, 2023
@jw-megagon
Copy link
Collaborator

Thank you so much for pointing it out. We directly use the evaluation metrics from the code in another paper which is a baseline method to compare with. We will add more clarification about it and allow users to customize the evaluation metrics when officially releasing this repo later.

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

2 participants