Refactor tests to include the batch accuracy test in the standard suite · Issue #750 · lenskit/lkpy · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
test_als_implicit
, and the predictiontest_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.This will reduce redundancy in the code.
The text was updated successfully, but these errors were encountered: