# Algorithms for pairing a rating system to an assignment queue

Attempting to research how to allow a group of people to effectively rank a set of objects (each group member will have contributed one object to the group), and then assign each member an object that's not their own based on:

• Their ratings of the objects,
• Their objects rating, and
• The object remaining to be assigned.

Idea is to attempt to assign objects to people based on the groups rating of their contribution to the group relative to other member's contribution, the the personal preferences expressed via the ratings.

Any suggestions for:

• Further research,
• Refining the statement of the problem/solution, or
• A solution.
-
Gven a pair `{person, object}` can you calculate a numeric value representing a measure of quality of the match between this person and this object? Can you evaluate this measure independently of matches between other people and other objects? – dasblinkenlight May 23 '12 at 1:18
@dasblinkenlight: Thanks, I've reflected on the questions you posted. The "measure of quality of the match between this person and this object" is relative to the fitness of the all objects, not just the object itself; guessing elo might work, but it might not, also not sure how many votes would be require to get the person vs group ratings; given a very small set of object, select best/worst iteratively, and removing the selection might work too. – blunders May 23 '12 at 1:57
@dasblinkenlight: As for "evaluating this measure independently of matches between other people and other objects" whole point of the system is to rate and distribute object relative to the contribution and preferences of members. Why would it be of value to attempt to assign value independently? – blunders May 23 '12 at 2:00
If you can provide numeric values for each pair `{person, object}` independently, your problem would be reduced to finding the optimal matching on a bipartite graph; you'd be able to use a variation of the min cat / max flow algorithm to obtain the optimal solution. – dasblinkenlight May 23 '12 at 2:08
Is there a need to balance load people's assigned objects? – JeffO May 23 '12 at 2:11

It depends a lot on the type of objects and persons in your sample. There may be several ways to achieve what you are trying to but I am listing an approach I have myself used in the past and hence am familiar with in quite a lot of detail. Other users may mention innovative new techniques.

I will refer to the activity of choosing an item as "buying" but it can refer to anything --voting, hating etc. This approach is only valid for objects that associate similarly with the buyer's (or chooser's, user's etc.) psychology. In such a case a preference/ratings matrix can be a very simple and crude way to solve the problem. Here is how such an approach works:

### Step 1: Data Gathering

1. You would ask people to contribute objects they liked with a scaled rating (say on a scale of 10).
2. In the "analysis" or "taste discovery" phase you would suggest them items that they haven't rated and ask them to rate them.
3. Furthermore, you would ask them to group/tag the items into pre-defined categories.

### Step 2: Analyze Correlation and R-Squared of buying tendencies

An example object-person ratings matrix may look like:

``````           Object 1    Object 2    Object 3  .  .  . Object N
Person 1      6           4           4                10
Person 2      4           2           1                 8
Person 3      8           9          10                 1
.
.
.
Person N      3           4           9                 2
``````

You will then have to run a regression on this matrix to determine correlations and R-Squared between object-object pairs, person-object pairs, and person-person pairs. Repeat this analysis with the category-object matrix and then finally the category-person matrix.

### Step 3: Interpret

If you can show that people who like A, B, and C also like D with a high probability (measured relative to other probabilities) then you can assume that another person who likes A, B, and C will also like D with a high probability. In some cases you can also measure likeliness coefficients --probability that objects will be liked/disliked given that another object is liked/disliked.

In cases where you cannot establish enough correlation between individual objects it may be possible to group/divide objects into hierarchies or genres (science fiction movies, Asian cuisine, denim outfits, swiss watches etc.) and then get correlation stats between those higher groupings. You can continue to hierarchise objects into broader or narrower groupings until you get meaningful correlations out. That is why we also collected category information above.

In many other cases, where no meaningful correlations exist, you will have to rely on network effects. For example, a person A may tend to follow person B's choices --regardless of the objects in question. You do not need to know if A is person B's friend/follower because the data you have collected will predict this pattern (if it exists) anyway.

### Pitfalls

1. Small sample size (of either users or objects). See also, law of large numbers.
2. Misinterpreting correlation as future prediction indicator --use both R-Squared and correlation to calculate probabilities.
3. Misclassifying the problem --sort of obvious. Here I have assumed that objects associate similarly with buyer's psychology --if that is not the case, this approach may not work.
-
+1 Thanks, appears I might have not been clear enough. Each object is one of a kind, and priority of selection from the array of objects is based on the ratings of the objects assigned by the community to a users object; meaning the higher a user's object is rated, the sooner they get to select an object from the objects remaining to be selected from. Users don't have to be asked to vote, since their voting is them listing which object they'd like most, all the way down to the one they'd like least; there's only going to be 20-70 objects/people per group. Am I missing something in your answer? – blunders Jun 4 '12 at 0:51
But in your question you said "based on Their ratings of the objects, Their objects rating, and..". But now you are saying only the ratings given by other users matter. So if I understand this correctly, a user's own assessment of the object does not influence the priority assigned to the object (well save the obvious case where the user's rating bumps the object up/down the queue). This makes the problem very simple --all you need to do is a simple priority queue with the priority key being the ratings. – Apoorv Khurasia Jun 5 '12 at 13:38
@blunders. Sorry, forgot to add your name in the previous comment. – Apoorv Khurasia Jun 6 '12 at 11:42
+1 Yes, I agree with your analysis, and suggestion in your comment. Guess the main issue I see is tie-breakers, meaning if there's a conflict randomly assigning a winner should effect other outcomes, which makes it more complex, but for now it appears I've got enough to go on. – blunders Jun 6 '12 at 19:31
@blunders, one advice on tie breakers --keep them consistent (regardless of your choice). That would keep the randomness away from your system. I had to learn that the hard way. – Apoorv Khurasia Jun 7 '12 at 11:16