Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    $\begingroup$ Thanks so much! I'll get around to accepting this answer sometime soon, when I've had a chance to try out the system. If you wanted to incorporate user and item features (like for example item class from a taxonomy or user region), how would you do that? $\endgroup$ Commented Jul 18 at 19:02
  • $\begingroup$ You are very welcome. To incorporate features like item class or user region, you could add embedding layers for these categorical features. Then concatenate them with the user/item ID embeddings to create enriched user/item vectors. You can still use a dot product if the dimensions match, or optionally apply a dense layer to project them. This allows you to model similarities based on shared metadata (eg. same region), and helps with cold-start generalisations..../cont $\endgroup$ Commented Jul 20 at 17:43
  • $\begingroup$ /cont....code-wise In code, you could add additional Input() layers for user/item features, embed them, then combine with the ID embeddings. For instance, user_embedding + region_embedding → user vector. Same for item class. If their dimensions differ, a Dense() layer can bring them to a common size. You could then use a dot product or small MLP for prediction. Something like that anyway ! $\endgroup$ Commented Jul 20 at 17:44
  • 2
    $\begingroup$ I tried out an enhanced version of your code (with the addition of categorical and numerical features) on real data and it worked great! Thank you so much! $\endgroup$ Commented Jul 23 at 21:10