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.
0
votes
0answers
10 views
Query on number increase
I am hoping to find a way to do this in a query of sorts. I need to get a count of the number of more recent consecutive years where a number has increased.
Example:
01/31/10 $0.90 0
...
0
votes
0answers
6 views
Xgboost rank:ndcg loss function
I'm trying to implement xgboost with an objective of rank:ndcg
I want the target to be between 0-3.
In my data for most of the groups, there is only 1 event per group which his target is not 0.
I ...
-2
votes
0answers
12 views
Ranked-based spatial clustering
I was wondering if there was any python (or R) packages out there that can do spatial clustering on ranked data?
For each US state I spatially varying value for education rankings. For example, for ...
-4
votes
2answers
126 views
Create table showing the sorted absolute correlation of various variables with another series
I want the output show the name of each X variable, its signed correlation to another series, and its absolute correlation, sorted by descending absolute correlation.
Using the following codes I was ...
0
votes
1answer
26 views
What's the Difference Between Kendall's Distance and Kendall tau Distance?
I'm now trying to use Kendall's distance to improve sets of rankings based on Borda counts method.
I'm asked to follow a specific document's instructions. In the document it states that :
"The ...
0
votes
2answers
58 views
How to combine duplicate data and get the largest values
I have a list of data example below:
> COLUMN A | COLUMN B |COLUMN C
APPLE |2 |RED
PEAR |3 |GREEN
APPLE |4 |RED
BANANA |5 |...
2
votes
1answer
46 views
Rank or merge sequential rows
I have a log file I need to either rank (but treating sequential and equal rows as ties), or merge sequential equal rows (based on specific column). My table looks like below, The Start and Stop are ...
0
votes
1answer
19 views
Is there a way to rank events per event record (ranking by row, not column) in Teradata?
I have a table with multiple columns related to events for each record. What I'm trying to do is rank each event within each record by date.
I've tried to transpose this in Excel but it doesn't like ...
0
votes
0answers
5 views
convert individual category predictions to ranking of category
I have a model that predicts the likelihood to purchase in 10 categories for a customers. For each customer and category, there is a score between 0 and 1 that quantify the purchase probability. I ...
0
votes
1answer
14 views
Simulate rank in mysql (without rank) with two conditions
Coming from this answer: Rank based on two columns
I've the following example:
CREATE TABLE tmpPoradi
(`player` int, `wins` int, `diff` int)
;
INSERT INTO tmpPoradi
(`player`, `wins`, `...
0
votes
3answers
68 views
Solving a ranking problem in a purely functional way using groovy
I have solved a problem that ranks fruits by the number of votes. Unfortunately, I want to solve the problem in a purely functional way without mutating the rankPosition variable. Here is my solution:
...
0
votes
1answer
69 views
How to rank values in a dataframe with indexes?
I have the following dataframe of topic document probablity matrix with the first row being names of text files.
1 2 ... ...
0
votes
1answer
27 views
How to rank mysql with groupby
Guy I am trying to ranking some data from my database, and I notice that it's going very wrong when I put the group by clause;
SET @rank=0;
SELECT @rank:=@rank+1 AS RankSemGenero
,a.nome AS ...
0
votes
0answers
9 views
Xgboost objective rank is position sensitive
I'm running xgboost with objective rank:NDGC and the input format of the dataset needed to be in libsvm fomart
and I'm wondering if the libsvm is position sensitive for this objective as we know that ...
0
votes
0answers
22 views
How to efficiently rank JSON objects of variable structure (with MongoDB)
Hello stackoverflow community,
i have a, probably kind of special, partial matching (ranking) problem that i couldn't solve efficiently within a database until now. Lets assume i have the following ...
0
votes
1answer
37 views
How to sort a table of applicant scores where each column is ordered based on the highest applicant score in that area?
I need to sort applicants into different boxes based on scores. I have calculated their match score to all boxes, and want the best matched applicants being selected first.
I'm looking to create VBA ...
0
votes
1answer
33 views
Is there a way to rank multiple columns in power query?
I am setting up a query where I need to rank multiple columns. I was able to sort the first column in descending order and inserted an index column. However, I am not able to rank the other columns.
...
-3
votes
1answer
27 views
How to check if some variable ranks top 5 in 3 simultaneous years?
hope y'all doing fine.
I was taking a test for a company on SQL (MySql) and there was a question I really didn't know how to answer. The question was "is there any manufacturer that ranks top 5 in ...
1
vote
1answer
22 views
SQL for conditional value ranking
I'm trying to add a column to this table:
CREATE TABLE #NEW_HIGH (SYMBOL char(4) not null, CLOSE_DATE date not null, CLOSE_PRICE money)
INSERT INTO #NEW_HIGH VALUES ('A','01/07/2019',31.46)
INSERT ...
0
votes
0answers
22 views
Sort by best with multiple weighted factors
I want to display a list of hotels sorted by "best". There are multiple factors that I need to consider in order to determine "best". I was thinking of arbitrarily weighting each factor and then ...
2
votes
1answer
24 views
Understanding numpy percentile computation
I understand percentile in the context of test scores with many examples (eg. you SAT score falls in the 99th percentile), but I am not sure I understand percentile in the following context and what ...
1
vote
0answers
30 views
Implementation of this Document-at-a-time Ranking Algorithm in Java? [closed]
I have to implement a search engine, which includes a ranking algorithm.
The function is BM25 for which I already decided to use the following: https://www.javatips.net/api/smile-master/nlp/src/main/...
0
votes
1answer
27 views
mysql trying to rank rows by order by
I'd like to calculate a ordered-by rank for my rows. It isn't calculating correctly- I'm only getting a null and 1. I expect to get a rank of 1, 2, 3... based on my joins/order by ladder_name_lh2 = ...
0
votes
0answers
19 views
How calculate tf-matching-score in query-document pairs
I was reading Information Retrieval book
(this link https://www.fi.muni.cz/~sojka/PV211/p06score.pdf) page 16 and 17 .
I have a question about calculating tf-matching-score in below example?
query: [...
0
votes
1answer
15 views
Ranking each row to create mask dataframe
Sample dataframe df is defined as follows:
import numpy as np
import pandas as pd
df = pd.DataFrame(10*(2+np.random.randn(500, 8)), columns=list('ABCDEFGH'))
Within each row rank the top 5 columns ...
12
votes
4answers
252 views
Find all subarrays of fixed length with a given ranking
I have an array of numbers, for example:
A = [1, 5, 2, 4, 3]
and an array that determines a rank, for example:
B = [0, 2, 1]
My goal is to find all the subarrays of A that "obey" the rank B. If a ...
0
votes
2answers
45 views
Convert data frame into a matrix of “ranked lists” based on unique values in column
Let's say I have a data frame df that looks like this:
df = data.frame(c("A", "A", "B", "B", "C", "D", "D", "D", "E"),
c(0.1, 0.3, 0.1, 0.8, 0.4, 0.7, 0.5, 0.2, 0.1),
c("v1", "v2", "...
-1
votes
1answer
15 views
Returning Values Based on Matching Criteria of Multiple Cells in Multiple Rows plus Rank from another Table in Google Sheets
How do I return different values (Y or N) to different cells (ColD - Master) based upon matching criteria (ColA - Date and ColB - Customer) and sort orders (MasterItemRanking tab ColA) in Google ...
0
votes
1answer
27 views
Creating a waiting listing system and re-ranking users
So here is my problem, I am working on a wait listing system for an app. A user would sign up to be notified when we launch, and offer referral links to help "boost" their spot in the wait list.
The ...
0
votes
2answers
29 views
SQL Ranking N records by one criteria and N records by another and repeat
In my table I have 4 columns Id, Type InitialRanking & FinalRanking. Based on certain criteria I’ve managed to apply InitialRanking to the records (1-20). I now need to apply FinalRanking by ...
0
votes
1answer
28 views
Ranking Pandas DataFrame Based on Closeness to a Specified Value
Apologies if this is a trivial task. I am very new to coding and Python and am learning as part of my dissertation.
I have a data frame and want to rank each column within it based on its closeness ...
0
votes
0answers
37 views
Update leaderboard ranks for multiple sub contests using php and mysql
I am making a fantasy sports mobile app, it contains matches and within a match, there can be any number of contests. We will consider 100 fantasy contests running within a match as an example.I want ...
1
vote
2answers
51 views
How to sort a struct based on 2 fields in C?
I have a struct used in a Hangman game where the user gets points based on the number of incorrect attempts.
My question is how to rank them, taking into account both the points (pontos) and the ...
-1
votes
2answers
58 views
Resetting Running Total based on value in another column per customerID - SQL Server
I've already tried looking on here for the answer to this question, and although have found similar queries, I haven't found this exact one.
I'm looking to count the instances of a customer getting a ...
0
votes
2answers
40 views
Creating a rank/index based on multiple columns
I wish to create a ranking/index in excel using multiple columns. I have tried rank and sumproduct, but I cannot achieve the desired result. I have three columns (one being a date) and would like to ...
0
votes
0answers
24 views
reverse engineering Hive rank/dense_rank function - how hive implements rank/dense_rank function
Does anyone know how the implementation looks like? I have a guess; please correct me if I'm wrong:
select
ENAME,SAL,dense_rank() over (order by SAL) DEN_RANK
from
EMP;
Supposing hive is doing a ...
1
vote
0answers
36 views
Modelling a user ranking system with NoSQL technologies
How would you model a system that ranks users based on the row creation date in a world-wide scale? Entries can only be added/removed once a day (as in a batch, for example). And the following ...
0
votes
1answer
56 views
How can I boost query terms in PostgreSQL full text search?
Is it possible to give weights or boost query terms in PostgresSQL full text search?
For example, while searching using the keywords "vehicle", "bus" ... it would rank higher rows with "vehicle" but ...
0
votes
0answers
111 views
How do you rank a dataframe over multiple columns?
I'd like to add a (dense) rank column to my dataframe based on multiple other columns, like rank() over (order by a, b) in SQL. In R, the rank function only accepts one column, so mutate(df, rank(a, b)...
0
votes
2answers
30 views
Assign rank to each row in a group in R
I have the following input dataframe and would like to first group it by Gene and then arrange by descending Expression. Once I've done that, I'd like to add a Rank column that ranks each row per Gene ...
0
votes
1answer
21 views
Doing ranking in ListView .vb
What should I do to call the Username and the Scores codes from 2 different form to run it in my ranking form and how to use SORT to do the ranking.
Username form
Scores form
Ranking form
0
votes
1answer
35 views
Get ranking within each group for r dataframe
I have a dataframe in R dat that contains the columns Gene, Expression, and SampleID. What I've done is sort dat such that it's grouped by Gene and arranged by descending Expression for each gene, ...
1
vote
0answers
22 views
Excel grouping and subsequent ranking keeping grouping
I have a file with monthly production data of factories which have specific subdivisions.
I have the subdivisions grouped under the factories.
I am trying to rank the delta of last month's ...
0
votes
0answers
30 views
How to tailor my result to rank rows on a yearly basis
How to tailor my result to rank rows on a yearly basis
Here, I need to retrieve rows for every year ordering from most recent to past and rank them based on batting Average.
eg: fOR YEAR 2017 - RANKS ...
0
votes
2answers
74 views
create a ranking and statistics with repeated database records
Today I want to get a help in creating scores per user in my database. I have this query:
SELECT
r1.id,
r1.nickname,
r1.fecha,
r1.bestia1,
r1.bestia2,
r1.bestia3,
r1....
0
votes
1answer
24 views
Custom ranking based on multiple criteria in Rails
I need to rank records in a database table based on two columns:
availability_date
and
updated_at
They're both datetime-type columns, but the conditions for ranking are not linear in time. So, ...
2
votes
2answers
44 views
Rank order grouped data in MySQL without session variables?
My data looks like this:
Table Name = sales_orders
Customer_id| Order_id| Item_Id
-------------------------------
1 | 1 | 10
1 | 1 | 24
1 | 1 | 37
1 ...
0
votes
0answers
48 views
NDCG Scorer for Classification
I'm solving a problem of ranking classes for each unique id based on the utilization quantity. I have 6 unique classes in the training and test data. My neural net mode predicts the utilization ...
0
votes
1answer
45 views
Nth largest node in Binary Search Tree
I'm trying to find the Nth largest node in a Binary Search Tree given a number. All other solutions online find the Nth smallest node such as this one:
/**
* Return the key in the symbol table ...
0
votes
0answers
24 views
Elasticsearch phrase freq score without IDF
I need a custom score that is a combination of phrase frequency (i.e. number of "John Hobs" occurrences - same order, next to each other) and custom score that is computed while indexing.
Basically ...