I'm working on a pure collaborative filtering model in LightFM using a simple user-item matrix.
When I have a training matrix that has more rows than the test matrix, I encounter this error: "Incorrect number of features in user_features"
It seems this is caused by line 789 in lightfm.py:
if not user_features.shape == self.user_embeddings.shape:
raise ValueError('Incorrect number of features in user_features')
Investigating this - it looks like it is being caused by line 778 in lightfm.py:
n_users, n_items = test_interactions.shape
Which suggests the size of the test dataset should match the train. And making them the same size does fix my error.
How can I persuade LightFM to let me have train and test datasets of different sizes?