How do I sort products by number of reviews and number of positive and negative reviews?

26 Views Asked by At

I am working on my side project, where I want to sort doctors' profiles at my website via a "sort best by reviews" button. I need to write polynomial for it, while having following factors about doctors:

  • reviews_factor: int[0, 1200] - total number of reviews for specific doctor (positive + negative)

  • negative_cnt: int[0, 1200] - number of negative reviews (< 4.5)

  • positive_cnt: int[0, 1200] - number of positive reviews (>= 4.5)

  • recommendations: int[0, 100] - positive reviews percentage, which is equal int(positive_cnt / total_cnt)

  • also we can consider that average score for doctor (in all specialities) is ~3.5.

A polynomial is an arithmetic expression containing the operations [+, -, *], variables (factors) and other constant values (floats or integers).


Example I came up with: P(x) = 2 * (recommendations * 0.01) * (recommendations * 0.01) + 0.5 * (reviews_factor * 0.001)

What's the best way to sort the doctors' profiles? I was thinking about Bayesian model or Reddit Sort, but there are functions like log or sqrt in it and it can't be written in single polynom, as far as I understood. Maybe I should use Taylor series for log or sqrt?

0

There are 0 best solutions below