is there a 'proper' way of doing a “you like this, other people who liked this also liked these things so you might like these” query?

StackOverflow https://stackoverflow.com/questions/11363662

Question

I need to produce a list of suggestions for a logged in user. Basically it's "Since you liked these things, and other people who liked those things like these things, so you might like these things too".

I could probably work out a decent algorithm for producing such results, but before I reinvent the wheel, I'm wondering if there is already a common or established method or search algorithm for producing such results?

Any suggestions or advice is greatly appreciated!

Était-ce utile?

La solution

typically Apache Mahout is used for such things, see on 'recommendations'

Autres conseils

The most commonly used way is the K Nearest Neighbours Algorithm.

The algorithm goes like this:

  • Pick a number N of "neighbours" to consider (e.g. 5)
  • Pick a way of scoring how similarity between two users' likes (e.g. the total number of items both users like)
  • To make recommendations for a user, first finding the N other users who have the most similar profiles. Here the 5 users who have most items liked in common with our user.
  • The recommendations are things liked by those other users that the current user doesn't already like. Naturally, the items liked by most of the N other users are the best candidates.

If Apache Mahout works for you, then go for it. But if not, this is by far the most commonly used (and one of the easiest) algorithms around. If you're googling, you probably want to search for "collaborative filtering", which is the accepted name for this problem.

Apache Mahout is a way to go. It's rather complex, but provide good results

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top