I have trained a SVD model to recommend items based on userId. However, is there any way to recommend items based on items list instead of userId?
For example, given a list of items, [1,2,3,4,5], SVD model finds the most similar items [9,10]. My solution is to find the similar items for each item from input [9,10], and get the common items as the output.
That is,
- the items which are similar to item 1 are
[9,10,12]and - the items which are similar to item 2 are
[9,10,13].
So that the common items are [9,10], but I don’t know whether there is a better way to do it.
Not very clear about what you described. I guess you mean you want item-based recommendations, like what Amazon is doing? .
This algorithm needs intensive off-line processing to prepare nearest items. Once they are done, a response to similar-item-query is very fast.
edit
Once you know the top
ksimilar items for each item, you have a score for each item pair, that is how similar two items are, orscore(i,j)Given a list of items:
[1,2,3]First you find top
kitems for each item in the list. You also have a score for each of them. Supposek=3:Then you aggregate score for all items present in
score([1-3],__), that is:After sorting, you know top to bottom items should be:
Of course, in the final list of recommendation item, you might want to remove anything that is already in the given list (items user already has).
Notice that in the above example, though item 44 presents in 3 rows, all their similarity scores are low. We still choose item 100 as the best match. The intuition is that we accumulate the similarity contribution and compare their aggregated contributions.