Question about Item-based KNN computation #250
-
Hi, I have a question regarding the Item-Item KNN implementation (as the code in So, the item-item similarity matrix is computed. When predicting the rating that a user would give an specific item, the k nearest neighbors to that item are computed. But I am unsure whether the "only end up using the neighbors that the user has rated, as we do not have ratings for the rest" is computed before or after the KNN search. With this I mean: either:
Some libraries implement the first option, while others do the second. Which one is implemented in Lenskit? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @julioasotodv! Converted to a Discussion, since this is a question rather than an actionable bug report or enhancement request. LensKit does (2). LensKit for Java also did (2). The actual computation is structured somewhat differently, but the result is equivalent to (2). If you do (1) you wind up with much lower coverage, as many fewer neighborhoods will have items rated by the user. |
Beta Was this translation helpful? Give feedback.
Hi @julioasotodv! Converted to a Discussion, since this is a question rather than an actionable bug report or enhancement request.
LensKit does (2). LensKit for Java also did (2). The actual computation is structured somewhat differently, but the result is equivalent to (2).
If you do (1) you wind up with much lower coverage, as many fewer neighborhoods will have items rated by the user.