-
Notifications
You must be signed in to change notification settings - Fork 222
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
Documentation: give more info on the input/output #53
Comments
Hey @mijamo -- this is great feedback, thank you for taking the time! In general, I think you're absolutely right about the documentation. I'm assigning this to myself to add more. At a glance, getting very large positive/negative predictions is expected behavior for certain loss functions. Which loss function are you using? Only RMSE loss functions will try to reproduce the input interaction values, so if your loss isn't RMSE then the predictions are unbounded. Having the items in similar order for many users tends to happen when the dataset has some items which are far more popular than others. A good way to correct for this is through selection of an appropriate loss function. I'd recommend using Regarding your other questions, I will elaborate them in the documentation. To answer quickly for you here: |
Thank you very much for your additional detail. My problem right now is that each predicted user representation seem to be more or less equal despite input data being different, to be more precise, if user1 has representation R, all the other users seem to have a representation xR, x being a number between 0 and 10. As a result, all items predictions for the users are always the same, no matter which loss function I use. This has been true when using This is what I made as a dummy user feature matrix ( a simplification of the real dataset, that still produces the same issue:
This is the items matrix:
and finally the interaction matrix:
I tried different representation graphs and loss functions. They give me different prediction order but in every case the prediction is the same for all the users. My gut feeling is that there is something wrong in my input data but I don't really know what right now. |
The algorithm may be having difficulty due to the item features all being nearly parallel. You may get better results by using a multi-layer neural network item repr (you can construct one using AbstractKerasRepr) or, more easily, by normalizing the item features. For example:
Yields new item features that are not parallel:
If you give that a shot, let me know if it works for you! |
One additional documentation request would be elaborating on n_tastes. Is this supposed to ferret out multiple representations for the same user? For instance, in the case when multiple people share a Netflix account? |
Great suggestion -- I added the mixture of tastes and attention systems after reading this paper: https://arxiv.org/abs/1711.08379 I'll add better documentation for it. It probably also merits a blog post outlining the thinking. |
Here is an example using RMSE to bound the prediction. https://stackoverflow.com/questions/33846069/how-to-set-rmse-cost-function-in-tensorflow |
Hi @jfkirk
However, there is an interesting point my items have no additional features. I just want to use user_features and interactions so I just created a dummy item_features matrix like |
Hello,
This library seems interesting, however I have a hard time actually using it. I am not quite sure of what the input/output are supposed to be and what is needed to have it working.
For instance I currently have user and items representations, which are both matrices of features. When I run Tensorrec, even with a large number of epoch (ex: 2000) and after training it with interactions between 1 and -1 I get predictions like
-2500
and850
. In addition, for every given user the predictions of items seems to always be in the same order, even though they have different values (ex: for 3 items and user the prediction could be[[10, 15, 9], [20, 25, 19], [-10, -5, -19]]
which seems unlikely to have with a big dataset of user/items/interactions).I have tried looking at the code but TBH it is not super easy as a first approach of a library to check the code to understand how you are supposed to use it.
I think it would be nice to clarify those points:
predict_user_representation
and reducen_components
to 3 I have the same representation for all users even if their features are very different ) but I don't really have an idea of why and things actually evolve through epochs.The text was updated successfully, but these errors were encountered: