Algorithm to calculate most popular courses

254 Views Asked by At

I am trying to get some statistics around the courses listed on a learning portal. one of which is, to get the 4 most popular courses based on below three factors:

  • Number of subscribers for the course
  • Average rating
  • Number of reviews

I have been mulling over the solution for quite a while, but unable to come up with the best approach to achieve above.

Can anyone please suggest, how I can use these factors to get the most accurate data on popular courses?

Any help is highly appreciated.

Thanks

3

There are 3 best solutions below

0
jbsu32 On

You can try this formula ->

popularity = 50*((NumSub/maxNumSub) + (RateAvg/RateMax)*(NumReview/NumSub))

Here,

NumSub = Number of Subscribers in the Course.
maxNumSub = Maximum Number of Subscribers in all the Courses.
RateAvg = Average Rating of the Course.
RateMax = The Highest rating a course can get.
NumReview = Number of reviews of the course.

Thus you will get a value for popularity out of 100.

e.g:

Let us assume, for a course,

NumSub = 80
maxNumSub = 100
RateAvg = 4.5
RateMax = 5
NumReview = 24

So, according to the formula,

popularity = 50 * ((80/100) + (4.5/5)*(24/80))
           = 50 * (0.8 + 0.9*0.3)
           = 53.5

Thus, the popularity value for the course is 53.5.

0
Tom Fuller On

This is how I would do it:

  1. Put subscribers, ratings and reviews in 3 separate lists
  2. Use a function like max() to find the largest value in the list, then delete that value from the list, do this 4 times, each time add the largest value to a new list (if you want)
  3. Do this for each list

Also what language are you using? I know this would work for me but it may be slightly different depending on the language

1
BPL On

Before giving you some subjective formula about it, I'd like to point you out to a couple of links about bayesian statistics and how IMDb rates films

How you choose the weights for your single set of parameters seems to be highly subjective in your use case. You don't have too many parameters to play with neither. For instance, you got number of reviews... but does this mean all of them are good reviews?