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 287389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:43:16+00:00 2026-05-12T05:43:16+00:00

I need to sort some products base on user ratings. Suppose we have 3

  • 0

I need to sort some products base on user ratings.

Suppose we have 3 products {a,b,c} and we have user’s feedbacks about this products.
It’s not important which user give us feedback (this question is not about correlative filtering if you are familiar with it – user interests is not the case here)

Each of these below lines is feedback from users when they tried to compare the 3 products:

a 150 points – b 0 points (this user just told us what he thinks of 2 products a and b and in comparison of a and b he thought that if he gives a 150 point then b worth 0 points)

a 150 points – c 20 points

c 200 points – a 10 points (despite the previous one this user thinks that c is better that a)

a 200 points – b 40 points – c 100 points

a 150 points – b 50 points

a 150 points – b 20 points

(These ratings are just a sample and in the real world number of products and ratings are much bigger than this)

Now I need an algorithm to find product’s rankings based on user votes. In my point of view, the best way is to describe this problem with a correlation graph and connect all the products to each other.

Any kind of help or tips is appreciated.

/********************************************************************************/

You cannot just add the points and calculate the mean of product’s points because it’s important how it got his points. Suppose a has got 800 points against b – then c get 10 points against a like this:

a 200 – b 0

a 200 – b 0

a 200 – b 0

a 200 – b 0

c 10 – a 0 (this means that c is better than a)

so definitely a is better than b but with a small 10 points c got a better rank from a

/********************************************************************************/

  • 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-12T05:43:17+00:00Added an answer on May 12, 2026 at 5:43 am

    You have some challenges. Add a ranking c 0 – b 20 and you got a circle, where c < b < a < c.

    And of course your order is not only not transitif ( from a < b < c does not follow a < c ), it is also not total (there might be elements you cannot decide which is better because no user voting has been done, even through other elements.

    What you get is a disconnected, directed, finite graph. (use the direction of the edges to say which element(node is better).

    Starting at a certain node you can find better nodes marching through the graph, maybe finding multiple non comparable solutions. If you visit the starting node again, stop processing that path.

    Maybe order theory in math can help you: look for order theory, partial order, Hasse diagram.

    To make this more practical:

    Use a two dimensional array with a row and a column per element. In the cell(a,b) calculate the sum of the ratings. Starting at a certain element a, follow all positiv (>0) connections, until you either reach a node that has no positiv connections or come back to a node you visited already. These nodes are your solutions.

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

Sidebar

Related Questions

I need to sort some products base on user ratings. Suppose we have 3
I have some sort of recursive function, but I need to parse a string,
I need to sort then print the result increasing and decreasing. I have some
Suppose I have different sort of products on my site, so I have classes
I have 2 tables which in simplified form look like this: Products( id: int,
I need some sort of dynamic array in C++ where each element have their
I need some sort of dataset which has related items in it. For example,
I need to sort some data that is not coming from a database, but
hello guys i need to sort some elements of integer in an integer array
Lets say I want to sort some items and need to sort them by

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.