Artificial intelligent assistant

Number of Likes and Dislikes to Star Rating system I have a **5 star rating system** that outputs a recommendation. A user inputs a rating based on a **Like** or **Dislike**. _What I would like to know is how to convert the number of likes and dislikes into a number which can be put into a 5 star rating system?_ **_An Example_** : Say if I have: **172 Likes** **101 Dislikes** How would I then get then get the average of these likes and dislikes, to put into a 5 star system which resembles the number of likes compared to dislikes?

One fairly straightforward way is to compute the fraction of likes as

$$ \text{fraction}_\text{likes} = \frac{\text{number}_\text{likes}} {\text{number}_\text{likes}+ \text{number}_\text{dislikes}} $$

and then if $\text{fraction}_\text{likes}$ is below $0.2$, that's one star; if it's at least $0.2$ but less than $0.4$, it's two stars; and so on. More than $0.8$ is five stars.

ETA: If you allow for zero stars, you could break it down as follows: less than $0.1$, zero stars; at least $0.1$ but less than $0.3$, one star; and so on. More than $0.9$ is five stars.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 74350b2e7ae7485cb1f6414fd45551e6