Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build a Ranking

Tags:

php

I have a newssystem where you can rate News with 1 to 5 stars. In the Database i save the count, the sum and the absolute rating as int up to 100 (for html output, so 5 stars would be 100 1 star would be 20percent. Now i have three toplists: Best Rated Most viewed Most commented

Last two ones are simple, but the first is kinda tricky. Before i took that thing over it was all a big mess, and they just put the 5 best rated news there, so in fact if there was a news rated 4.995 with 100k votes and another one with 5 stars at 1 vote, the "better rated" one is on top even if that is obv ridiculous. For the first moment i capped the list so only news with a certain amount of votes (like 10 or 20) can be in the list.

But i do not really like that. Is there a nice method to kind-a give those things a "weight" with the count or something like that?

like image 908
Flo Avatar asked Jul 10 '09 10:07

Flo


People also ask

What is a ranking model?

Ranking models typically work by predicting a relevance score s = f(x) for each input x = (q, d) where q is a query and d is a document. Once we have the relevance of each document, we can sort (i.e. rank) the documents according to those scores. Ranking models rely on a scoring function. (

How do you create a survey ranking?

To create a ranking survey, create a survey as normal, and then add a ranking question where you see fit. You can toggle between the standard ranking and click ranking as needed. You can add an unlimited number of attributes to each ranking question.

What is a ranking algorithm?

A ranking algorithm is a procedure that ranks items in a dataset according to some criterion. Ranking algorithms are used in many different applications, such as web search, recommender systems, and machine learning. A ranking algorithm is a procedure used to rank items in a dataset according to some criterion.


1 Answers

Have you considered using a weighted bayesian rating system? It'll weight the results based on the number of votes and the vote values themselves.

like image 126
Codebeef Avatar answered Oct 05 '22 15:10

Codebeef