lyst / lyst/lightfm

How to Calculated Highest-Recommended item(s) across groups of users/rows?

Open
#640 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.1k
Forks
724
PR merge metrics
No merged PRs in 30d

Description

I have a set of LightFM recommendations I have trained via WARP loss and just implicit feedback (user-item transaction history; no separate user-features or item-features yet).

I have groups of users/rows that are relevant for my business case, and I want to calculate the "most-recommended (or top 3) items across [group of users]." However, I've seen warnings in other comments that recommendation scores seem not to be comparable across user/rows (e.g. [maciejkula](https://github.com/maciejkula) wrote "User-item scores out of the LightFM model do not have a guaranteed range or scale (as that is irrelevant for ranking items for any particular user)" in 2018 in [this issue](https://github.com/lyst/lightfm/issues/242)

Is there a recommended way to calculate e.g. top-1,2,3 recommended items across groups of users, since we shouldn't average user-item recommendation scores across user/rows? A couple possible ways forward below, but wanted to ask the experts in case I'm off-base somehow:
- Normalizing user-item recommendation scores within rows (so each user/row's item scores vary -1 to 1), and then averaging those normalized values across rows (maciejkula recommended something like this in the issue above, albeit in response to a different usecase/question)
- Just counting the number of users an item is top-ranked for. Top-ranked item across users is item that gets most highest-recommendation-score. (Though this would not provide credit/weighting for items which are consistently e.g. 2nd-highest-recommended instead of 20th-highest-recommended item for many users).

Any advice/guidance or corrections to anything I may have misunderstood would be much appreciated. Thanks for maintaining this great library!

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is named. Start by reviewing LightFM’s user-item score semantics and the aggregation approaches described in the issue; done would require a maintainer-backed recommendation for a group-level ranking method, with scope and validation criteria recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.