New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to combine interaction matrices #176
Comments
You can also try encoding the explicit interactions as user features. In that sense, the final user representation will be characterized by the sum of a user-specific embedding and the embeddings associated with liking various movies. |
@JasonTam Thanks for your answer. I was considering the same thing, but I was worried that by doing so I will add a lot of bias to the recommender. In other words, the most telling latent features to predict whether a user has viewed an item, are the explicit feedback features. The lack of independence among user features and the interaction matrix is not a problem in practice? Am I missing something here? |
You can combine the explicit and implicit feedback data in the model by giving higher weights to interactions that have explicit likes. This is somewhat crude, but should work. I don't have a firm opinion on how to treat feature likes. A more principled approach to implicit + explicit data is something like this paper. I have a related implementation here via the truncated regression loss. In your case, you'd treat the implicit likes as the truncation variable and explicit likes as the truncated ratings. |
@maciejkula Thanks for the info.
Let me get this straight. I have to do this outside of the realm of LightFM, right? Like in the way I outlined above. In the case of one implicit and one explicit interaction matrices, I have to train two separate models, get a prediction from each, and take the weighted average of the predictions, where higher weight goes to the prediction obtained from the model trained with the explicit data. |
Your implicit interactions would just be a boolean of whether a user has interacted with an item or not. Then you can use your explicit data to fill in disclaimer: I haven't found |
I have this dataset : For some reasons, Convergence + AUC is better Any idea why pure CF is better than Hybrid ? |
Copying my answer from #225: If your hybrid model performs worse than a pure CF model, the following may be helpful.
|
Thanks !
1) 2) and 3) have been checked.
Strangely, pure CF converged fast (after 4 epochs) and AUC on test is quite high
Also tested om additionnal test data, AUC is high (>.85).
what do you mean by
inverse-frequency weighting of your features ?
On Dec 19, 2017, at 23:33, Maciej Kula <notifications@github.com> wrote:
|
In the feature matrix, give low values to common features, |
ok, for continouous feature.
But, here, most are categories.
Is there any way to check the item embedding “quality” (outside of total AUC) ?
On Dec 20, 2017, at 0:39, Maciej Kula <notifications@github.com> wrote:
In the feature matrix, give low values to common features, 1.0 / count_of_occurrence for example.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No, I am suggesting this for categorical features. Instead of inserting a 1, insert the weight. I imagine you could, depending on what task is important to you. |
1) Isn’t Item feature input be as one hot encoding ?
2) you mean
EmbeddingWi x 1/freqi makes inderweight most frequent category and
makes diversify
What is the dimension of item_embedding ?
|
For a general overview of inverse frequency weighting, you could read about the TF-IDF technique. |
Ok,noted.
After testing, my view is
if Nusr >> Nitem then
pure CF has higher AUC....
As you mentionned, embedding may not improve when the Nitem is low....
(similar items...)
On Dec 22, 2017, at 5:44, Maciej Kula <notifications@github.com> wrote:
Even if it is one-hot encoding, you can always insert some other value (0.5, 0.001) instead of the 1.
I mean that you should use values other than 1 in the item/user feature matrices. If you look at scipy sparse matrices you will see that they have a data array that holds the values for the non-zero entries.
For a general overview of inverse frequency weighting, you could read about the TF-IDF technique.
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I’m closing this issue because it has been inactive for a long time. If you still encounter the problem, please open a new issue. Thank you! |
Hi,
I'd like to build a website, where users can like items and after they liked an item, they can refine what features of that item they liked. (one item can have max ~50 features)
On top of the above explicit feedback, I'd like to incorporate some implicit feedback, like whether a user clicked on an item, percentage of photos viewed, time spent on the item's profile, etc.
Since LightFM was designed to use only one interaction matrix, I should have somehow combine them. On possible way forward would entail the following:
Now I can call predict on all the above models, and average their results. I can also use weighted average, e.g. models based on explicit likes get higher weights, etc. Also, I have not put much thought into it yet, but it might be possible to learn the weights for the models automatically.
Is there a better/more efficient way to combine the interaction matrices?
Reading through the LightFM paper, Factorisation Machines might suit my needs better, because unlike LightFM, they can solve for multiple interaction matrices.
Therefore, does it make sense to attempt to use LightFM in my situation?
The text was updated successfully, but these errors were encountered: