Skip to content
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

to_ratings_per_user function unclear #1

Closed
franziweindel opened this issue Jul 9, 2022 · 5 comments
Closed

to_ratings_per_user function unclear #1

franziweindel opened this issue Jul 9, 2022 · 5 comments

Comments

@franziweindel
Copy link

Hi Florian,

I am having troubles understanding what the function to_ratings_per_user does. Should it return the the number of total ratings each user has made or for each users the actual ratings?
Also when running it I do get an index error since both of the keys in the df dataframe that is first defined are floats, so they cannot be used to index into the cube variable.

Any help is appreciated, thanks,

Franzi

@FlorianWilhelm
Copy link
Owner

Hi @franziweindel, so basically the function constructs a matrix representing the mapping (u, i) -> v, where u is some user_id, i is the i-th interaction of the user with user_id u, and v is the item_id. The first dimension of the matrix is the number of users and the second dimension is the maximum number of interactions a user had. Since the matrix is rectangular, item_id -999 is used for padding. Does this explain it?

@franziweindel
Copy link
Author

Hi @FlorianWilhelm,

Thank you for your response and explaination! It is clear now! However, in my end results I now get negative entries for the topic-item distribution phi, does that have something to do with the padding or the negative sampling for the BPR loss function.

Thank you,

Franzi

@FlorianWilhelm
Copy link
Owner

Hi, it's the logits your are looking at. What are you trying to do btw?

@franziweindel
Copy link
Author

ahh okay thanks a lot!
I am writing my thesis about explainable RS with the goal of identifiying implicit preferences from consumer behavior and I am trying to implement your LDA model on my dataset right now , because I eventually want to extend it to a correlated LDA model with the additional bias and user conformity paramters : )

@FlorianWilhelm
Copy link
Owner

Nice! Let me know when your work is available, I am looking forward to read it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants