beta-team / beta-recsys

Beta-RecSys: Build, Evaluate and Tune Automated Recommender Systems
https://beta-recsys.readthedocs.io/en/latest/
MIT License
162 stars 33 forks source link

test_data_split assert case bug #354

Closed mengzaiqiao closed 3 years ago

mengzaiqiao commented 3 years ago

Describe the bug

with the following code,

 testdata = generate_data()
 print(testdata)

use_id 0 in generate_data() actually has two records with the same timestep 300, which are the last interactions for use_id 0. When we do the leave-one-out split, there will be two versions of splits that are both valid. But current testing codes only takes the row index as an indication for the asserting, which will only accept one splitting method.

https://github.com/beta-team/beta-recsys/blob/91742c25d38c0c1a9008cec5e77a9a94df9bf16b/tests/test_data_split.py#L245

To Reproduce

See the example blew, which is a valid split, but was rejected by the test.