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

Tests are wrong? #18

Open
JMMackenzie opened this issue Dec 18, 2024 · 0 comments
Open

Tests are wrong? #18

JMMackenzie opened this issue Dec 18, 2024 · 0 comments

Comments

@JMMackenzie
Copy link
Contributor

I think some of the failing tests might actually be wrong.

For example, consider:

assert result.lower_bound == pytest.approx(0.744, rel=1e-3), f"Lower bound {result.lower_bound} does not match expected value 0.744"

This test is computing RBP with phi = 0.8 on the ranking [ [1], [2], [3], ..., [25] ]with positive docs [1] and [2] and negative document [3].

The lower-bound RBP score should thus be:

((1 - 0.8 ) / 0.8 ) * (0.8 ^ 1 + 0.8 ^ 2) = 0.360

since docs [1] and [2] are both relevant at ranks 1 and 2.

Could someone please verify? We'll need to check the other tests carefully too.

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