Questions tagged [ranking]

Ranking is the sorted order of an element in a list of elements. Usually a high ranking means the element is good in terms of certain metric.

is used in:

  • sorting algorithms
  • information retrieval to represent the relevance of documents with respective to the search queries.
  • recommendation to rank top-k items.
1634 questions
10
votes
10 answers

Quick relative ranking algorithm

Let's say I own 100 video games, and I want to order them from most liked to least liked. It's very hard to give each video game a numeric value that represents how much I like it, so I thought of comparing them to each other. One solution I came up…
Lanaru
  • 9,421
  • 7
  • 38
  • 64
10
votes
5 answers

Get user rank with MySQL

I read many topics about this problem but I can't find the solution. I have a table (called users) with the users of my website. They have points. For example: +-----------+------------+ | User_id | Points | +-----------+------------+ | 1 …
Jordy
  • 4,719
  • 11
  • 47
  • 81
9
votes
5 answers

C# Ranking of objects, multiple criteria

I am building a plugin for a LAN party website that I wrote that would allow the use of a Round Robin tournament. All is going well, but I have some questions about the most efficient way to rank over two criteria. Basically, I would like the…
John Gietzen
  • 48,783
  • 32
  • 145
  • 190
9
votes
1 answer

Difference between sort(), rank(), and order()

What is the difference between sort(), rank(), and order() in R. Can you explain with examples?
Amit Gupta
  • 2,698
  • 4
  • 24
  • 37
9
votes
4 answers

Combining heuristics when ranking social network news feed items

We have a news feed, and we want to surface items to the user based on a number of criteria. Certain items will be surfaced because of factor A, another because of factor B, and yet another because of factor C. We can create individual heuristics…
9
votes
2 answers

How do scoring profiles generate scores in Azure Search?

I want to add a scoring profile on my index on Azure Search. More specifically, every document in my index has a weight field of type Edm.Double, and I want to boost them according to this value. I don't want to just directly sort them with respect…
halileohalilei
  • 2,220
  • 2
  • 25
  • 52
9
votes
2 answers

Sorting A List Of Songs By Popularity

For student council this year, I'm on the "songs" committee, we pick the songs. Unfortunately, the kids at the dances always end up hating some of the stupid song choices. I thought I could make it different this year. Last thursday, I created a…
Matt Egan
  • 809
  • 1
  • 10
  • 16
9
votes
4 answers

PHP MySQL Query most popular in last 24 hours

Say I want to get ten records with the MOST likes in the last 24 hours. Here's what I have so far: $date = date("o-m-d"); $query = "SELECT date_created,COUNT(to),from,to FROM likes WHERE date_created LIKE '$date%' GROUP BY to ORDER BY COUNT(to) DESC…
Dylan Taylor
  • 351
  • 2
  • 5
  • 12
9
votes
5 answers

Ranking algorithm using likes / dislikes and average views per day

I'm currently ranking videos on a website using a bayesian ranking algorithm, each video has: likes dislikes views upload_date Anyone can like or dislike a video, a video is always views + 1 when viewed and all videos have a unique…
Dan
  • 11,914
  • 14
  • 49
  • 112
9
votes
2 answers

Row Rank in a MySQL View

I need to create a view that automatically adds virtual row number in the result. the graph here is totally random all that I want to achieve is the last column to be created dynamically. > +--------+------------+-----+ > | id | variety |…
Moak
  • 12,596
  • 27
  • 111
  • 166
9
votes
2 answers

SQL ranking query to compute ranks and median in sub groups

I want to compute the Median of y in sub groups of this simple xy_table: x | y --groups--> gid | x | y --medians--> gid | x | y ------- ------------- ------------- 0.1 | 4 0.0 | 0.1 | 4 0.0…
Juve
  • 10,584
  • 14
  • 63
  • 90
8
votes
1 answer

Sorting TfidfVectorizer output by tf-idf (lowest to highest and vice versa)

I'm using TfidfVectorizer() from sklearn on part of my text data to get a sense of term-frequency for each feature (word). My current code is the following from sklearn.feature_extraction.text import TfidfVectorizer tfidf =…
Chris T.
  • 1,699
  • 7
  • 23
  • 45
8
votes
2 answers

hacker news algorithm in php?

This is the Hacker News ranking algorithm, which I think is a simple way of ranking things, espcially if users are voting on items, but I really dnt understand this, can this be converted to PHP, so I can understand it fully? ; Votes divided by…
getaway
  • 8,792
  • 22
  • 64
  • 94
8
votes
2 answers

Assign ranks to objects by values in an array of objects

I have an array of objects like so: var data = { a: [ { keyone:'c', keytwo: 'anna', keythree: 21, keyfour: 15 }, { keyone:'a', keytwo: 'anna', keythree: 22, keyfour: 15 }, { keyone:'s', keytwo: 'anna', keythree: 10,…
Rutwick Gangurde
  • 4,772
  • 11
  • 53
  • 87
8
votes
2 answers

Algorithm/formula to calculate Product ranking on a ecommerce website(Based on following criteria)

I have been Working on algorithms and formulas to find out a score for the products available on my ecommerce website.Basically, I want to calculate some kind of score to rank the products when a user searches it. I'll give some background on the…
user4115825