Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating a popularity algorithm - bayesian average

Featured Replies

Ok so I've been creating a popularity algorithm for the last few days following this tutorial...

 

Bayesien Average

 

So far I have it working ok but I would like to expand it to take into account how many views, comments etc. Hopefully someone can give me some guidance on this.

 

Should I start just trying to create an algorithm similar to Reddit's instead???

Depending on what you are trying to achieve a simple modification to the formula would be to consider the "vote" and "constant" values and as to what effect on the popularity you would like views/comments (positive/negative?) to have.

 

Would a video/post/page/image be more popular than another based on 100 comments vs 50 comments for example? What if the comments where negative? How would you determine this?

 

Similarly to views, would a single view == a single vote (confirmed opinion).

 

With that in mind consider a constant value for a comment (positive and negative) and view to be used to divide their total number by such that 20 views == 1 vote, 1 positive comment == 0.5 vote then simply add these totals to the votes and complete the calculation.

 

Alternatively use the method on votes, comments and views using different constants as above, which would provide greater statistics in terms of providing insight into which video/post/page/images etc had high views but little comments or votes and add the values for an overall popularity value.

 

Having not seen reddits approach I'm not sure on a comparision.

 

Hopefully that makes some sense :unsure:

Edited by CSN-UK

  • Author

Thanks for the reply, I currently have the system in place that takes into account the + & - votes and a score is calculated via this that reflects the overall average of each page, which I think takes into account the age of the post.

 

I have noticed though that posts with the same score rating (and therefore all the posts) need to take into account the amount of views they have because there is no order of preference at the moment which is causing 3 posts with the same score to be ordered alphabetically, which is obviously wrong. I could simply order them a second time based on views but I don't think this is the correct approach.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.