I'm using lightfm recommendation for usecase where i have to predict user interested app screens for an android app.For this i'm using implicit data - how many times user visited particular screen (count based).There are total 10 screens/items which we need recommend.
I have created train data as first appeared records in intial months and test data has only last 2 weeks records .
My problem is for all users in the test data its predicting same screens/items and even same scores for all the items.
Assuming that model is under fitting; I tried few things
Normalizing the visited count of screens -sample weights(tied various ways like subtracting the values from mean,l1,l2)
Increased user features
dataset1 = Dataset()
dataset1.fit((interactions['user_id'].values),
(interactions['firebase_screen'].values),
user_features=uf)
# plugging in the interactions and their weights
(interactions_csr, weights) = dataset1.build_interactions([(x[0], x[1], x[2]) for x in interactions.values ])
user_id_map, user_feature_map, item_id_map, item_feature_map = dataset1.mapping()
model = LightFM(loss='warp',
random_state=2016,
learning_rate=0.08,
no_components=200,
user_alpha=0.0000000001)
model.fit(interactions_csr, # spase matrix representing whether user u and item i interacted
user_features= user_features_csr, # we have built the sparse matrix above
sample_weight= weights, # spase matrix representing how much value to give to user u and item i inetraction: i.e ratings
epochs=20,num_threads=2)
precision = precision_at_k(model,interactions_csr,user_features=user_features_csr,k=5).mean()
recall = recall_at_k(model,interactions_csr,user_features=user_features_csr,k=5).mean()
print('Precision at k:',precision)
print('recall at k:',recall)
Precision at k: 0.6130435
recall at k: 0.9521348394430235
_
My total users - 1262
train data users - 976
test data users - 558
no of users who are only in test but not train - 203 (cold start) but we have user features
Hi All,
I'm using lightfm recommendation for usecase where i have to predict user interested app screens for an android app.For this i'm using implicit data - how many times user visited particular screen (count based).There are total 10 screens/items which we need recommend.
I have created train data as first appeared records in intial months and test data has only last 2 weeks records .
My problem is for all users in the test data its predicting same screens/items and even same scores for all the items.
Assuming that model is under fitting; I tried few things
Precision at k: 0.6130435 recall at k: 0.9521348394430235
_
_
test_res are same even if i give different features for other users
What are the reasons for same scores what can i do to overcome it.