Questions tagged [ranking-functions]

Ranking functions return a ranking value for each row in a partition. Depending on the function that is used, some rows might receive the same value as other rows. Ranking functions are non-deterministic.

193 questions
2
votes
1 answer

issue with top_n_rank full text search

This is about top_n_by_rank parameter of full text search. I have a query, suppose: SELECT * FROM Publisher p INNER JOIN FREETEXTTABLE(Publisher, Name, @searchText, 100) PublisherSearch ON p.Id = PublisherSearch.[Key] ORDER BY…
1
vote
1 answer

Significance test on the difference of Spearman's correlation coefficient

I have got a human-rated set of ranking (HUMAN-RANKING), a set of ranking generated by the presently used, popular method (PRESENT-RANKING), and finally a set of ranking generated by my purposed method (MY-RANKING). I calculated the Spearman's…
1
vote
1 answer

Setup Metarank (for recommendation) with its one minute setup tutorial fails with validation error

I was following Metarank documentation and tried to get it up and running with its sample data which I couldn't. since it is the tutorial and I have no clue to how to fix it, I'm eager to know what is the problem. This is the course of actions I…
1
vote
1 answer

Excel RANK formula not resolving ties

I wrote this Rank formula to rank the numbers in column D by the values associated with them in Column E. I wanted the formula to resolve ties randomly, e.g. if there was a tie for first place, it would just randomly choose one of the accounts to be…
CNG09d
  • 19
  • 2
1
vote
0 answers

How do I create test dataset for tf ranking model?

I'm trying to evaluate the NeuralGAMS LTR model using a test set and I'm doing this to create it: # Build Test Dataset for Model Ingestion features = preprocess_features(features_file) feature_cols = np.array(features['cols']) # Create specs for…
1
vote
1 answer

Using Ranking Functions for Sets of Rows

I have the following syntax which created the below table: SELECT [OPEN_DATE] ,[CODE] ,[ID] ,ROW_NUMBER() OVER (PARTITION BY [ID],[CODE] ORDER BY [OPEN_DATE],[CODE]) AS [RowOrder] FROM [Table] OPEN_DATE CODE ID …
Cinji18
  • 619
  • 8
  • 22
1
vote
0 answers

Using Cumulative and Percent Rank functions in my query

I'm working on this query and would like to use the cumulative distribution or percent rank function to provide me with cumulative distribution and the percent rank for field 'leads distribution'. however, it appears that when the decile value is…
1
vote
1 answer

Ranking Function Output

The book R for Data Science goes over ranking creation functions, and I'm having trouble understanding the examples even after looking at the documentation. Here is the example: y <- c(1, 2, 2, NA, 3, 4) min_rank(y) #> [1] 1 2 2 NA 4 …
1
vote
1 answer

Oracle rewrite query using rank or dense_rank

I have the following query and sample data, which is working fine. It finds the max salary for employee(s) for each department. Although it works, I like to change it to use rank or dense_rank (unsure how to do this) to achieve the output I…
Pugzly
  • 844
  • 3
  • 14
1
vote
1 answer

rank for nan values based on group

I have dataframe with column d1 and now i am trying calculate 'out' column after ranking that column when there in 'nan' value with in a column. data_input = {'Name':['Renault', 'Renault', 'Renault',…
san1
  • 455
  • 2
  • 11
1
vote
2 answers

JavaScript Custom Star Rating System

I want to create a star rating system that has 5 stars. You can not select a half star, only a whole one. I want to achieve the following: If the user clicks on the star, the cilcked one and the other before it should be activated, and if the user…
scrummy
  • 795
  • 1
  • 6
  • 20
1
vote
2 answers

Get all transaction details of a user f their 2nd month of transaction

Trying to get the 2nd transaction month details for all the customers Date User_id amount 2021-11-01 1 100 2021-11-21 1 200 2021-12-20 2 110 2022-01-20 2 200 2022-02-04 1…
Harish reddy
  • 431
  • 2
  • 9
1
vote
0 answers

what should I use to accurately predict the success of a team consisting of 6 individuals against another team based on past individual performance

For a given team of 6 individuals, calculate the probability that this particular configuration of 6 will defeat a different, known, team based on how well each of the chosen 12 individuals have performed in past matches within different…
1
vote
2 answers

Python pandas how to group and match

Let's say we have two tables, trans and product. Hypothetically the trans table consists of over a billion rows of purchases bought by users. I am trying to find paired products that are often purchased together(purchased on the same date) by the…
1
vote
1 answer

Rank function for a number or an array

I am making the player ranking system. Every player finishes the game in minimum time. To make the system, I have generated a random array of 100 numbers. Now I want to have the second array of let's say 5 elements. Which will be the random array…
Irfan Yaqub
  • 140
  • 10