Problem:
Assigning indices to the folds is not really random. Easily reproducible by checking the results on a simple recommender, such as the ItemAverage, and k-fold CV. Fold[i] always has the same result over multiple runs.
Reason:
Each int in random_indices will eventually get assigned to the same fold as you iterate over the content of random_indices (the entity indices).
Fix:
Iterate over indices of random_indices instead.
Problem: Assigning indices to the folds is not really random. Easily reproducible by checking the results on a simple recommender, such as the ItemAverage, and k-fold CV. Fold[i] always has the same result over multiple runs.
Reason: Each int in random_indices will eventually get assigned to the same fold as you iterate over the content of random_indices (the entity indices).
Fix: Iterate over indices of random_indices instead.