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
{{ message }}
Repository navigation
leave_k_out_split produces incorrect values in test set #639
I noticed odd behavior in leave_k_out_split - specifically, under certain circumstances (many rows with one value?), the number returned for the withheld test set value is different from the actual value. This causes train + test to fail to reconstruct the original matrix.
Created at 2022-12-23 13:59:28 CST by reprexlite v0.5.0
I believe the issue is in _take_tails - the returned test_idx array has multiple copies of the first user index returned, so we end up with a test set value that is copied multiple times.
(As an aside, the call to _take_tails when shuffled=True does not pass on the rng, so the random state cannot be maintained.)
Activity
chrisjkuch commentedon Dec 23, 2022
Existing test can also be made to fail occasionally if
densityis set below0.1:implicit/tests/evaluation_test.py
Line 18 in 871e0c7