A
A
Alibek Kulseitov2019-04-15 22:20:30
Algorithms
Alibek Kulseitov, 2019-04-15 22:20:30

How does the rating system work on websites?

How does the rating system work on websites? For example, on ad sites? Is there any commonly accepted logic/calculus?
I need to implement a rating system on the ad site, which will depend on positive reviews and negative ones. I would like to know what happens if the number of negative becomes much more than positive, and so on.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Talyan, 2019-04-15
@flapflapjack

The usual arithmetic mean is calculated. A table with the item_id and rate fields is stored separately.
The rating is

SELECT SUM(rate) as sumrate, COUNT(item_id) as cnt from ratings where item_id=345 group by item_id

$rate=Sumrate/cnt

G
Griboks, 2019-04-15
@Griboks

1. Draw the graph you need.
2. Choose a function for it.
3. Match the argument (cf. arithmetic/ratio/%/...)
For example, R = 10lg(positive/negative)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question