lyst / lightfm

A Python implementation of LightFM, a hybrid recommendation algorithm.
Apache License 2.0
4.77k stars 691 forks source link

Normalize explicit ratings for weights? Train more models with different types of interactions? #534

Closed SantiDu closed 4 years ago

SantiDu commented 4 years ago
  1. I want to use explicit data (number of clicks / ratings) as weights, with warp loss, is it better to normalize the ratings by subtracting the user bias and item bias? or is it not necessary? What is the difference between this bias and the bias in lightfm?

  2. I have seen this post, my question is:
    If I have two or more kinds of interactions with different weights for the same user-item pair: can I call build_interactions with [(user1, item1, interaction_weight1), (user1, item1, interaction_weight2)] to one model, instead of training two separate models?

SantiDu commented 4 years ago

For the first question, I think it makes sense to normalize the "ratings", because in the warp sampling process, for every pair (user1, item1) if the model are not sampling only from fixed user (user1, item2,3,4...) or fixed item (user2,3,4..., item1), but all the rest of the negative interactions, then bias does skew the ratings, we need to normalize it. For the second question, I think the answer is quite obvious, it's just I don't understand if I have two weights for the same user-item pair, which weight will be used? Or their sum will be used?