Creating recommendations for single users without leveraging user identity features
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 724
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am creating recommendations for a single user with a model that was trained with user features but without user identity features (i.e. have set `user_identity_features = False` when creating the Dataset class). However, I encountered a shape issue when the method `_construct_feature_matrices` is called in the `predict` method. I noticed that the mismatch in shape was caused by this line (Line 851) in the `predict` method:
`n_users = user_ids.max() + 1`
From what I can understand, user_ids is an array as long as the number of items but every element is the index value of a user (if a single user id is provided). However, shouldn't it be the number of users if user_features is provided?
Thanks ahead.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the predict method at line 851 and trace how user_ids and user_features are passed to _construct_feature_matrices. Reproduce prediction for a single user with user_identity_features=False, then inspect the resulting shapes. Done means the prediction path accepts the provided user features without a shape mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100