Skip to content

Instantly share code, notes, and snippets.

View abancp's full-sized avatar

Aban Muhammed C P abancp

  • Malappuram,kerala,india
  • 09:39 (UTC -12:00)
View GitHub Profile
@abancp
abancp / gist:592386ff475eee41e063d4e8e2a875a6
Created December 8, 2023 03:19
Calculating Start Rating - Algorithm like Amazone
Amazone use machine learning models to calculate rating of products . we can use simple average algorithms like this
(5* Number of 5star + 4 * Num of 4star + 3 * Num of 3star + 2 * Num of 2star + 1 * Num of 1star) / ( total number of ratings )
eg :
total number of ratings : 3790
5 star rating : 2373
4 star rating : 651
3 star rating : 268
2 star rating : 77