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

(Feature) Recommend top N items given a user #9

Open
BradKML opened this issue Mar 31, 2021 · 8 comments
Open

(Feature) Recommend top N items given a user #9

BradKML opened this issue Mar 31, 2021 · 8 comments

Comments

@BradKML
Copy link

BradKML commented Mar 31, 2021

Querying every item on the table would be inefficient. There could be a way to make this process simpler by multiplying a user's vector with the whole item matrix.
Guessing: np.dot(self.pu_[u_ix], self.qi_) + self.bi_+ self.bu_[u_ix]

@gbolmier
Copy link
Owner

gbolmier commented Apr 8, 2021

Great point @BrandonKMLee! We could either implement a new predict_n_item method or adapt the predict method to also handle this case. Feel free to open a pull request otherwise I'll do something later on.

@BradKML
Copy link
Author

BradKML commented Apr 8, 2021

Another problem: identifying pre-rated items, to prevent bad recommendations.

@gbolmier
Copy link
Owner

gbolmier commented Apr 9, 2021

Can you elaborate more on this, e.g. wdym by pre-rated items?

@BradKML
Copy link
Author

BradKML commented Apr 10, 2021

@gbolmier when the rated items are in the dataset, recommendations should promote new unrated items over older viewed items (depends on the use case tho).

@gbolmier
Copy link
Owner

I was thinking of passing a list of the items' ids in parameter, so that it's easy to use as a mask on the item latent factor matrix

@BradKML
Copy link
Author

BradKML commented Apr 12, 2021

Between masking the latent factors and masking the output, which is better?

@gbolmier
Copy link
Owner

If we mask the item latent factor matrix we'll only compute the estimated ratings of interest, which will save time compared to computing all the estimated ratings and then mask the ones we aren’t interested about.

@BradKML
Copy link
Author

BradKML commented Apr 12, 2021

This would be more optimized!

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