8000 Refactor tests to include the batch accuracy test in the standard suite · Issue #750 · lenskit/lkpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor tests to include the batch accuracy test in the standard suite #750

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

Open
mdekstrand opened this issue May 8, 2025 · 0 comments
Labels
build Build, test, and platform support

Comments

@mdekstrand
Copy link
Member

Right now, we have test_???_batch_accuracy tests scattered throughout the test suite, with very similar structures.

We can refactor those to be a part of the standard tests in src/lenskit/testing/_components.

The basic pieces of this:

  • Add new field(s) to the scorer test class for the subclass to specify the expected NDCG and/or RMSE. This should support min and max values, with the max being optional.
  • Add two new test cases to the scorer test class, one for top-N accuracy (NDCG) and the other for prediction accuracy (RMSE). The top-N can be modeled off of the test in test_als_implicit, and the prediction test_als_explicit. If the corresponding metric limits are not set, the test should skip; if it is available, then the test should run and check the result value.
  • Modify tests for existing scorers — any test file with one of the batch accuracy tests — to remove the separate test, and replace it by specifying the expected accuracy on the test class that it defines.

This will reduce redundancy in the code.

@mdekstrand mdekstrand added the build Build, test, and platform support label May 8, 2025
@mdekstrand mdekstrand moved this to In Progress in LensKit Development May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build, test, and platform support
Projects
Status: In Progress
Development

No branches or pull requests

1 participant
0