Simple ranking algorithm

2020-06-03 06:27发布

I need to create a poll that is to create a ranking list of items in order of how good they are. I intend to show each user two items together and make them choose one which they think is better, and repeat the process multiple times over. It is sort of similar to what you could see in the Social Network movie. How should I be ranking the items based on the received answers?

3条回答
贪生不怕死
2楼-- · 2020-06-03 06:51

My assumptions, based on your comment, proceed as follows.

  1. You have a collection of original images.
  2. You have x copies of a given original image where x >= 1.
  3. For a given picture, users will only see copies of that image and not images from another original picture.

For clarification, do you intend to set it up so user's see two random distorted images, or will you associate distorted images with specific original images?

If you intend to associate specific distorted images to specific original images, I think my idea will work.

  1. For each vote on a distorted image associated with an original item, add 1 to the total # of votes for that original.
  2. Add 1 to the # of yes votes on the distorted image chosen.
  3. Add 1 to the # of not votes on the distorted image not chosen.
  4. Add 1 to the the total # of votes on each distorted image.
  5. Normalize the "image rank" with image_rank = (# total_distorted_image_votes / # total votes for original image) * 100
  6. Normalize the "yes" rank with yes_rank = (#total_distorted_image_yes_votes / #total_distorted_image_votes)*100
  7. Sort by either image_rank or yes_rank. Using yes_rank will reward images with large percentages of yes votes whereas using image_rank will reward images that appeared a lot.

You can expand beyond this to start ranking original image "groups" as well if you have a counter for total overall votes. You just normalize those (image_votes / total_votes) * 100 and sort it. Then you'd get a "ranking" of which images appear(ed) the most.

查看更多
forever°为你锁心
3楼-- · 2020-06-03 07:05

I think you can use the Elo Algorithm which was used to rank chess players and was created by Professor Arpad Elo. You can read more abot this algorithm on this Wikipedia Page

It was also used by Mark Zuckerburg in making Facemash. It was a site on which people can rate girls upon the bases of there hotness. If you have watched the picture "The Social Network" you would be knowing about this. If you want a practical use of this algorithm You can visit this page. If you know PHP you can easily change the look of the index.php (homepage). Yoou can replace the images of girls with those of what ever you want to rank

查看更多
贼婆χ
4楼-- · 2020-06-03 07:07

Look at the ELO chess rating system if you want something fancy.

查看更多
登录 后发表回答