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

Question - how to get final recommendations for each user? #10

Open
eddiesun opened this issue Feb 1, 2017 · 2 comments
Open

Question - how to get final recommendations for each user? #10

eddiesun opened this issue Feb 1, 2017 · 2 comments

Comments

@eddiesun
Copy link

eddiesun commented Feb 1, 2017

I ran wals and got 2 output files, one is the user matrix and other is the item matrix.
My question is, is there some tool that can multiply the two matrices together to get the final user-item matrix, which can be used to get recommendations for each user?

I have the following 2 factor files as the output of wals

// user factors file 
user1 factor_1 factor_2 factor_3 ...
user2 factor_1 factor_2 factor_3 ... 
user3 factor_1 factor_2 factor_3 ...
...

// item factors file 
item1 factor_1 factor_2 factor_3 ...
item2 factor_1 factor_2 factor_3 ... 
item3 factor_1 factor_2 factor_3 ...
...

What I want is something like this

user1 item3|score item1|score item5|score ...
user2 item9|score item2|score item8|score ...
...

For each user, item recommendations are sorted by their scores
If I have the output above, I can recommend item3, item1, item5 to user1 and item9, item2 item8 to user2, etc.

Is there a tool to do this or I have to write something to multiply the 2 matrices and do filtering/sorting myself?

Thanks,
Eddie

@albietz
Copy link
Contributor

albietz commented Feb 2, 2017

Hi Eddie,
We did not initially plan to provide this functionality in the library, that said it should indeed be easy to just do a matrix multiply in numpy/pandas/other if your dataset is not too big (or just for few users at a time).

@eddiesun
Copy link
Author

eddiesun commented Feb 2, 2017

Hi Alberto,
Thank you for the clarification. Our dataset is big, so I will use/write something else to process it.
qmf is a good tool. Thanks again for your contribution.

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