Skip to content

Exclude already-liked items from nearest-neighbour recommendations - #766

Open
AryanRG wants to merge 1 commit into
benfred:mainfrom
AryanRG:fix/exclude-liked-item-neighbours
Open

AryanRG wants to merge 1 commit into
benfred:mainfrom
AryanRG:fix/exclude-liked-item-neighbours

Conversation

@AryanRG

@AryanRG AryanRG commented Dec 1, 2026

Copy link
Copy Markdown

Fixes the already-liked item filtering reported in #345.

The item-item scorer set the scores of liked items to zero before choosing the top N. When a user had fewer than N eligible neighbours, their own liked items could still appear in the results. A zero score could also outrank an eligible neighbour with a negative score.

Skip liked items while accumulating neighbour scores. The regression fits a cosine recommender on two items and requests both for a user who has already liked one. It now returns only the other item.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant