I have an music items that are scored by users between 1 to 5, and I need a formula to get the 5 most scored items.
But obviously an item that get 3.5 average score
I am using for my music files following method:
Rating is measured in percents (0-100) Songs which are not rated get 50% as a gift Every time someone votes for a song its rating is incremented Every time someone votes against the song its rating is decremented If song rating goes higher than MAX which is 100, then MAX is set to current song rating If song rating goes below MIN, then MIN is set to song rating After every voting which changes MIN or MAX I am doing normalization for every song in the list like that:
NewRating = (CurrentRating - MIN) *100/(MAX -MIN) Then I am setting back MIN to 0, and MAX to 100.
This method gives equal chance for old and new songs to get the right rating quickly. Also each vote on best and worst song effects others, what I also consider as right thing to do.
When choosing songs to play (or to vote) I am generating a random number in range of 0-100 and searching for the next song with rating equal or higher than this number.
Bad songs are going down and chosen rarely, good songs are going up and are chosen more frequently but I am still leaving a chance for even worst song to be played(voted) sometime in the future.