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
A minor thing that could be an issue for smaller datasets.
Since the default value for K is 200 for popularity recommender, it will fail with a ValueError if the dataset has fewer than 200 items.
This is because the dimensions of U, I, V will be different when creating a scr_matrix:
U, I, V = [], [], []
for user in users:
U.extend([user] * self.K)
I.extend(items)
V.extend(values)
score_matrix = csr_matrix((V, (U, I)), shape=X.shape)
This of course can be solved by manually providing the value for K, but we can't rely on that.
A minor thing that could be an issue for smaller datasets.
Since the default value for K is 200 for popularity recommender, it will fail with a ValueError if the dataset has fewer than 200 items.
This is because the dimensions of
U, I, V
will be different when creating a scr_matrix:This of course can be solved by manually providing the value for K, but we can't rely on that.
Suggested fix:
U.extend([user] * min(self.K, len(items)))
The text was updated successfully, but these errors were encountered: