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.
- 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$Zorgoth– Zorgoth2025-07-18 19:02:22 +00:00Commented 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$Robert Long– Robert Long2025-07-20 17:43:03 +00:00Commented 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$Robert Long– Robert Long2025-07-20 17:44:01 +00:00Commented 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$Zorgoth– Zorgoth2025-07-23 21:10:32 +00:00Commented Jul 23 at 21:10
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
- MathJax equations
$\sin^2 \theta$
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. machine-learning), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-py