Simple ranking algorithm

后端 未结 3 1229
天命终不由人
天命终不由人 2021-02-08 06:24

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 the

相关标签:
3条回答
  • 2021-02-08 06:52

    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.

    0 讨论(0)
  • 2021-02-08 07:02

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

    0 讨论(0)
  • 2021-02-08 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

    0 讨论(0)
提交回复
热议问题