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

How to use predictions after training the model #10

Open
GabrielePicco opened this issue Jul 4, 2017 · 1 comment
Open

How to use predictions after training the model #10

GabrielePicco opened this issue Jul 4, 2017 · 1 comment

Comments

@GabrielePicco
Copy link

GabrielePicco commented Jul 4, 2017

Hi Guocong Song,

I do not know if this is the right place to ask questions but I did not find a better place.
I'm trying to figure out your code to integrate a recommender system in my application.
I downloaded the code and trained the model.
After training the model I would need to make the predictions, that is, get suggestions for each user so that they can be saved in a DB from which I access with a NODE.js application.

How do I retrieve this list of suggestions for each user when the training is done?
I also did the same question on stack overflow: https://stackoverflow.com/questions/44898080/recommender-system-svd-with-tensorflow

Thanks in advance if you will dedicate some time to help me.

@yindia
Copy link

yindia commented Aug 28, 2017

Create your iter_predct same like iter_test and write below code just after iter_test loop. Write different function to read prediction data without ratings. Use New pull request it help you to scale

for users, items, rates in iter_predct: 
                    pred_batch = sess.run(infer, feed_dict={user_batch: users,
                                                            item_batch: items})
                    pred_batch = clip(pred_batch)

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