question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

item-item similarity

See original GitHub issue

I’m trying to implement both recommendations and item-item similarities based on an ImplicitFactorizationModel trained on clickstream data. The former is trivial using the predict method, but the latter I’m not quite sure about. Looking at the code, I could obtain the item embeddings in a similar way to how it’s done in _components.py and representations.py, and then apply a similarity measure to the resulting torch tensors.

Is this a sensible approach / Is there a better way to do this / Is it even possible?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
maciejkulacommented, May 23, 2018

I strongly recommend using a GPU for sequence models if you aren’t already. The PyTorch CPU implementation is quite slow.

I think that sequence models are definitely a better way to go. They are more flexible and allow you to easily incorporate new interactions as they come in, without retraining your model.

0reactions
rragundezcommented, Sep 5, 2018

@maciejkula it seems this discussion went quite off-track to the issue. So coming to the issue of retrieving item similarities, this could done by adding a method to BilinearNet since you are already holding the item_representations there, let’s say this method is _compute_item_similarities(item_ids, ..). Then in the actual model you would have another method like def item_similarities(items_ids) which calls self._net._compute_item_similarities(items_ids, ...) something like that.

The same could be done with the user representations for example to identify clusters of users, etc.

Thanks to your good code this shouldn’t be too difficult to implement. I could take care of this if you find it useful

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comprehensive Guide on Item Based Collaborative Filtering
Item -item collaborative filtering is a type of recommendation system that is based on the similarity between items calculated using the rating users...
Read more >
Item-to-Item Based Collaborative Filtering - GeeksforGeeks
Item to Item Similarity: The very first step is to build the model by finding similarity between all the item pairs. The similarity...
Read more >
Item-item collaborative filtering - Wikipedia
Item -item collaborative filtering, or item-based, or item-to-item, is a form of collaborative filtering for recommender systems based on the similarity ...
Read more >
Overview of Item-Item Collaborative Filtering ... - Medium
Item -based Collaborative Filtering ... Item-based collaborative filtering uses the rating of co-rated item to predict the rating on specific item.
Read more >
Recommender Systems 4 Item Item Collaborative Filtering
Your browser can't play this video. Learn more. Switch camera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found