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

I'm confused, there is no approximation ? #165

Open
bot66 opened this issue Jul 19, 2022 · 0 comments
Open

I'm confused, there is no approximation ? #165

bot66 opened this issue Jul 19, 2022 · 0 comments

Comments

@bot66
Copy link

bot66 commented Jul 19, 2022

In the README.md introduction:

Finally, we compute the AP as the area under this curve (shown in light blue) by numerical integration.
No approximation is involved since the curve is piecewise constant.

But I look into the code (line 185 main.py)

    """
     The Average Precision (AP) is the area under the curve
        (numerical integration)
        matlab: ap=sum((mrec(i)-mrec(i-1)).*mpre(i));
    """
    ap = 0.0
    for i in i_list:
        ap += ((mrec[i]-mrec[i-1])*mpre[i])
    return ap, mrec, mpre

The calculated AP, is the area under the red line not the light bule line, isn't it ?
But README.md says that is the area under the light blue line.

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