-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
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.
Suggested fix:
U.extend([user] * min(self.K, len(items)))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working