Multi-Item Based Recommendation

22 views
Skip to first unread message

James Bathgate

unread,
Feb 14, 2012, 11:12:04 AM2/14/12
to Neo4j
I'm looking into a few graphing databases to see if any of them can
help me tackle a problem I'm working on. The problem is given a
handful of songs someone has liked, can you determine songs other has
liked. It's the normal recommendation engine problem, but with a
multiple "source" songs. I believe the solution to the problem is
found in finding songs with the smallest average shortest path.

James

Marko Rodriguez

unread,
Feb 14, 2012, 11:16:24 AM2/14/12
to ne...@googlegroups.com
Hi,

Here are solutions in Gremlin (http://gremlin.tinkerpop.com) with increasing complexity:

- Rank the songs that people like that like the same songs I like?
g.v(1).out('liked').in('liked').out('liked').groupCount.cap
- Rank the songs that people like that like the same songs I like that I don't already like?
g.v(1).out('liked').aggregate(x).in('liked').out('liked').except(x).groupCount.cap

If you want multiple source songs, do:

g.v(1,2,3,4,5,6)._().out('liked').in('liked').out('liked').groupCount.cap

HTH,
Marko.

http://markorodriguez.com

James Bathgate

unread,
Feb 14, 2012, 11:35:39 AM2/14/12
to Neo4j
Marko,

The issue with that solution I believe is that there are going to be
products that aren't directly liked that are the good recommendations.
For example songs given song 1 and 2 that actually share no likes the
best recommendation might be songs that are liked by songs that are
liked by people who like both songs 1 and 2. It can go way more than 1
level deep.

James
Reply all
Reply to author
Forward
0 new messages