lightfm icon indicating copy to clipboard operation
lightfm copied to clipboard

recommendations for cold start users when model trained without user_features?

Open zahraegh opened this issue 2 years ago • 1 comments

Due to the getting the same recommendations for almost all users, I trained the model without user_features as was suggested in here (~90 unique items are recommended). The model training is like so:

model = LightFM(no_components= embedding_dimension, learning_rate=0.01, loss='bpr',
               learning_schedule = 'adadelta', random_state=seed)
model.fit(train_interactions,
          epochs=NUM_EPOCHS,
          num_threads=20, 
          verbose=True)

During the inference, for the cold and existing customers, I did the following as was suggested here:

if not cold_start_user_flg:
     scores = model.predict(user_ids=user_id_map[user_id], 
                            item_ids=np.arange(n_items),
                           num_threads=20
                           )
 else:
     scores = model.predict(user_ids=0,
                            item_ids=np.arange(n_items),
                            user_features=user_feature_cold_start,
                            num_threads=20
                           )

My question is since the model got trained without user_features, how is it even able to provide recommendations for cold-start users?

zahraegh avatar May 24 '22 23:05 zahraegh

You can not predict for cold-start users without nothing about user_features. ref:https://stackoverflow.com/questions/46924119/lightfm-handling-user-and-item-cold-start

Beytab avatar May 29 '22 08:05 Beytab