I am building recommender system - hybrid in Lightfm. My data has 39326 unique users and 2569 unique game titles(items). My train interaction sparce matrix has shape: <39326x2569 sparse matrix of type '<class 'numpy.float64'>' with 758931 stored elements in Compressed Sparse Row format> My test interaction sparce matrix has shape:<39323x2569 sparse matrix of type '<class 'numpy.float64'>' with 194622 stored elements in Compressed Sparse Row format>
I train model: model1 = LightFM(learning_rate=0.01, loss='warp')
model1.fit(train_interactions,
epochs=20)
which creates object: <lightfm.lightfm.LightFM at 0x1bf8c8dc4c8>
But when I try to check accuracy by:
train_precision = precision_at_k(model1, train_interactions, k=10).mean()
test_precision = precision_at_k(model1, test_interactions, k=10).mean()
I get error message: Incorrect number of features in user_features WHY??? Clearly the shapes are compatible? What am I missing?