Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3242128
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:16:44+00:00 2026-05-17T18:16:44+00:00

This question is more logic than programming at the moment.. once I understand what

  • 0

This question is more logic than programming at the moment.. once I understand what algorithm(s) I need to use I’ll be looking into how to implement it.

I’ve got a list of items in a database that need to be voted up or down by users to determine if they are correct or not. The aim is to provide a % for each item to show how reliable the item information is.

There’s a few criteria to take into account..

  • Votes are not absolute – each user’s vote weight depends on their karma.
  • User karma should be calculated based on their votes – for example, if the user submits an item and other users vote to confirm that it is correct, that user’s karma would increase. Karma could also be given if a user votes for an item in the same direction that other users with high karma have voted. If they vote in the opposite direction to other users with high karma, their vote would be considered incorrect and although it’d lower the score of the item it’d also lower their karma level, making them less influential in future voting.
  • Users can cast negative votes as well as positive votes.
  • Calculated scores of items should take into account the age of the item (over time the score would decrease as the item could become less reliable).

Does anyone have any recommendations on the best algorithm(s) for doing this, or any tips on how to implement this in a programming language (such as PHP)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:16:44+00:00Added an answer on May 17, 2026 at 6:16 pm

    Read this first: http://www.evanmiller.org/how-not-to-sort-by-average-rating.html

    It’s an introduction to a mathematical concept known as Wilson score confidence intervals for Bernoulli parameters.

    That article is a great primer on how to use your user’s votes to calculate a score that is actually useful and mathematically sound. Do this, and you’re already ahead of Amazon.com

    Then, I think you probably need to tweak that formula a bit. In that formula it uses p for the fraction of positive votes. You might need to update the formula for p, to reflect the karma of the user that cast that vote.

    Finally, to take the age into account, you multiply the outcome of the formula with an age multiplier. For example, if you want the outcome to become less relevant by 1% for each day it ages, multiply it by 0.99^age_in_days.

    In a nutshell, that is the path I would follow. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is more UI/Design-ish than hard-core programming is. Background: I've been coding in
This is more of a logic question than a coding question. I am building
EDIT: This question is more about language engineering than C++ itself. I used C++
I suppose this question is more general than working with COM components. I have
This is related to my previous question More than 1 Left joins in MSAccess
There may be more than one way to ask this question, so here's a
I had asked this question Adding more attributes to LINQ to SQL entity Now,
This is a code review question more then anything. I have the following problem:
This question was asked to me in an interview. Suppose char *p=malloc(n) assigns more
In relation to this question ( Efficient hashCode() implementation ) I have one more

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.