Getting similar items
See original GitHub issueHi, not really an issue. I am new to LightFM. Before I used implicit for generating recommendations but there was no build-in option for passing in user- / item-features.
Implicit defines a function on the model for getting similar items. Does adapting this function to LightFM work? I think I’m missing the theoretical background to see for myself.
def similar_items(self, itemid, N=10):
scores = self.item_factors.dot(self.item_factors[itemid]) / self.item_norms
best = np.argpartition(scores, -N)[-N:]
return sorted(zip(best, scores[best] / self.item_norms[itemid]), key=lambda x: -x[1])
https://github.com/benfred/implicit/blob/master/implicit/als.py
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Similar items: Rich products feature on Google Images
The Similar items feature enables users to browse and shop inspirational fashion photography and find product info about items they're interested in. Try...
Read more >Find Similar Products to Recommend to Users
Finding similar products based on machine learning is an effective way to get relatable products to use in marketing and in-app.
Read more >Finding Similar Items - Zyte
This post describes an approach to the problem of finding similar items among crawled items and how this was implemented at Scrapinghub.
Read more >Google Image Search app gets “similar items” shopping ...
The Google Image Search app for Android is getting a new “similar items” feature offering users a selection of products to buy related...
Read more >How to Find Similar Items - YouTube
A short tutorial on how to find similar items within your DevonWay application. ... Get $300 PER DAY For FREE From AI Art...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe the following should work with LightFM. One thing to note is that the similarity function below ignores the item biases that LightFM learns, but I think it should be suitable for generating sensible recommendations.
This is correct. You can also use the
get_<user/item>_representations
methods to get the latent representations: http://lyst.github.io/lightfm/docs/lightfm.html#lightfm.LightFM.get_item_representations.