views:

220

answers:

3

I need to sort some products base on user ratings.

Suppose we have 3 products {a,b,c} and we have user's feed backs about this products. It's not important which user give us feed back (this question is not about correlative filtering if you are familiar with it - user interests is not the case here)

Each of these below lines are feed backs from users when they tried to compare the 3 products:

a 150 points - b 0 points (this user just told us what he thinks of 2 products a and b and in comparison of a and b he though that if he gives a 150 point then b worth 0 point)

a 150 points - c 20 points

c 200 points - a 10 points (despite the previous one this user thinks that c is better that a)

a 200 points - b 40 points - c 100 points

a 150 points - b 50 points

a 150 points - b 20 points

(These ratings are just a sample and in the real world number of products and ratings are much bigger than this)

Now I need an algorithm to find product's rankings based on user votes. In my point of view the best way is to describe this problem with a correlation graph and connect all products to each other.

Any kind of help or tips is appreciated.

/**************************************************************************/**

you cannot just add the points and calculate the mean of product's points Cause it's important how it got his points suppose a has got 800 points against b - then c get 10 points against a like this:

a 200 - b 0

a 200 - b 0

a 200 - b 0

a 200 - b 0

c 10 - a 0 (this means that c is better than a)

so definitely a is better than b but with a small 10 points c got a better rank from a

/************************************************************************/

+1  A: 

What an odd way of ranking. I suggest that for each user, you need to create a ranking for all products they've ranked first. For instance, if a user does this:

a 200 - b 0
c 10 - a 0

Then you might want to convert that into a complete set for the user like this:

c 210 - a 200 - b 0

Then you need to normalize (assuming all users have the same weight):

c 100 - a (200/210) - b 0

Then if users have a different weight (in other words, one user has more credibility than another), then you can do this (assume this user has credibility of 5):

c 100*5 - a (200/210)*5 - b 0

Once you've done that, you could sum up all the results for each product over all users.

Scott Whitlock
+2  A: 

Take a look at http://msdn.microsoft.com/en-gb/magazine/dd148646.aspx?pr=blog. It describe five 'ranking' systems. The context is about testing but I think the underlying concepts apply well enough to your problem domain.

TheArtTrooper
+1  A: 

Sounds pretty complicated. The way I'd approach it is to periodically reevaulate the rankings and store the sort order to the database. From what you've described it sounds like a gigantic algebraic system. I don't know if that can be solved in the DB but even if it could, it might take O(n^holy crap) long to solve, so I feel that caching will be your friend here.

As for the actual finding of the sort order, I'd build a list of equations, like:

a = b + 400 c = a + 10

And once you have the whole list build, solve the whole thing and cache the rankings

Josh
Yeah we have came up with the catching technique you are mentioning.
EBAGHAKI
Good. So you're just trying to figure out specifically how to determine the actual rankings? What language are you using?
Josh
Language is not case we can use anything for that. We need a robust algorithm.
EBAGHAKI
Looks like TheArtTrooper gave you just what you were looking for! Good luck!
Josh