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 can I get recommendations based on multiple items for a user-based engine? #414

Open
ziyadmsq opened this issue Jul 16, 2022 · 2 comments

Comments

@ziyadmsq
Copy link

I'm trying to build a user-based recommendation engine that takes multiple items that the user likes and then predicts more items based on it, is there a certain algorithm for that or a function?

for example get_recommendations([itemid1, itemid2, itemid3]) and then returns a list of items and the estimated rating or based on the nearest neighbors

Many thanks

@NicolasHug
Copy link
Owner

Hi @ziyadmsq , I'd suggest looking at our FAQ https://surprise.readthedocs.io/en/stable/FAQ.html, and possibly start with the getting-started guide: https://surprise.readthedocs.io/en/stable/getting_started.html

@Techie5879
Copy link

Techie5879 commented Sep 11, 2022

Hi @ziyadmsq , I'd suggest looking at our FAQ https://surprise.readthedocs.io/en/stable/FAQ.html, and possibly start with the getting-started guide: https://surprise.readthedocs.io/en/stable/getting_started.html

I'm having a similar problem. The top_n_recommendations in FAQ helps us to predict ratings for a SVD model for users that are already in the trainset.

But I actually want to predict top-N recommendations for a new user that rates certain items and that gets passed to the model and it predicts the top N movies that this user can watch. What to do if the user isnt in the already-trained trainset??

EDIT: I found a way, but that was by creating a new pandas dataframe with the list of movies rated by users and then concatenating it to the full trainset, and building an anti_testset for that, and finally predicting on that. But seems computationally intensive (as I'm using model.test(anti_testset), which takes about 30 secs). Is there any alternative?

EDIT 2: This seems to give same recommendations no matter what items the user rates. So I'm stumped now

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

3 participants