ranking

Comparison-based ranking algorithm

戏子无情 提交于 2019-11-27 17:27:57
I would like to rank or sort a collection of items (with size potentially greater than 100,000) where items in the collection have no intrinsic (comparable) value, instead all I have is the comparisons between any two items which have been provided by users in a subjective manner. Example: Consider a collection with elements [a, b, c, d] and comparisons by users b > a , a > d , d > c . The correct order of this collection would be [b, a, d, c] . This example is simple, however there could be more complicated cases: Since the comparisons are subjective, a user could also say that c > b . In

trec 2019 fair ranking track

倖福魔咒の 提交于 2019-11-27 16:43:11
trec 2019 fair ranking track 最近实验室要求参加trec 2019新出的track:fair ranking track。这里整理一下该任务的思想和要求。这次track主要为学术论文数据的排序。 1 Protocol 会给定一个query集合Q,其中$q\in Q$。对于每个请求,会有一个query q和一个文档集合$D_q$。你需要做的就是根据q来重排序(rerank)$D_q$,重排序结果是$\pi$。最后把每一个请求都处理完返回$\pi$的集合的$\Pi$。过程如下: Algorithm 1 Evaluation protocol $\Pi$←{} for q,$D_q\in Q$ do $\pi$←SYSTEM(q,$D_q$) $\Pi$←$\Pi+[\pi]$ end for return $\Pi$ 2 Evaluation 衡量指标主要分为两部分,相关性(revelance)和公平性(fairness)。 所谓相关性就是document和query的相关性,公平性主要为Author Exposure即论文作者的曝光度。 先介绍如何衡量作者的曝光度: 2.1 Measuring Fairness 2.1.1 Measuring Author Exposure for a Single Ranking 先为单个请求的重排序结果$\pi

Simplest way to plot changes in ranking between two ordered lists in R?

拜拜、爱过 提交于 2019-11-27 16:24:38
问题 I'm wondering if there is an easy way to plot the changes in position of elements between 2 lists in the form of a directed bipartite graph in R. For example, list 1 and 2 are vectors of character strings, not necessarily containing the same elements: list.1 <- c("a","b","c","d","e","f","g") list.2 <- c("b","x","e","c","z","d","a") I would like to generate something similar to: I've had a slight bash at using the igraph package, but couldn't easily construct what I would like, which I imagine

Row Rank in a MySQL View

浪子不回头ぞ 提交于 2019-11-27 14:28:20
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 | num | > +--------+------------+-----+ > | 234 | fuji | 1 | > | 4356 | gala | 2 | > | 343245 | limbertwig | 3 | > | 224 | bing | 4 | > | 4545 | chelan | 5 | > | 3455 | navel | 6 | > | 4534345| valencia | 7 | > | 3451 | bartlett | 8 | > | 3452 | bradford | 9 | > +--------+------------+-----+ Query: SELECT id, variety, SOMEFUNCTIONTHATWOULDGENERATETHIS() AS num

Efficient method to calculate the rank vector of a list in Python

人盡茶涼 提交于 2019-11-27 13:09:12
I'm looking for an efficient way to calculate the rank vector of a list in Python, similar to R's rank function. In a simple list with no ties between the elements, element i of the rank vector of a list l should be x if and only if l[i] is the x -th element in the sorted list. This is simple so far, the following code snippet does the trick: def rank_simple(vector): return sorted(range(len(vector)), key=vector.__getitem__) Things get complicated, however, if the original list has ties (i.e. multiple elements with the same value). In that case, all the elements having the same value should

Percentage rank of matches using Levenshtein Distance matching

六月ゝ 毕业季﹏ 提交于 2019-11-27 13:04:28
问题 I am trying to match a single search term against a dictionary of possible matches using a Levenshtein distance algorithm. The algorithm returns a distance expressed as number of operations required to convert the search string into the matched string. I want to present the results in ranked percentage list of top "N" (say 10) matches. Since the search string can be longer or shorter than the individual dictionary strings, what would be an appropriate logic for expressing the distance as a

Ranking with millions of entries

*爱你&永不变心* 提交于 2019-11-27 09:29:37
问题 I'm working on a server for an online game which should be able to handle millions of players. Now the game needs leaderboards and wants to be able to show a players current position and possibly other players near the current players position as well as the positions of the players friends. Now I've done this stuff before in MySQL and I know how it's technically possible, however I figured since this is a common practice for a lot of online games there must be existing libraries or databases

Finding number of elements in one vector that are less than an element in another vector

笑着哭i 提交于 2019-11-27 07:55:59
问题 Say we have a couple vectors a <- c(1, 2, 2, 4, 7) b <- c(1, 2, 3, 5, 7) For each element b[i] in b I want find the number of elements in a that's less than b[i] , or, equivalent, I want to know the rank of b_i in c(b[i], a) . there are a couple naive ways I can think of, e.g. doing either of the following length(b) times: min_rank(c(b[i], a)) sum(a < b[i]) What's the best way to do this if length(a) = length(b) = N where N is large? EDIT: To clarify, I'm wondering if there's a more

Mysql - How do I order results by alternating (1,2,3, 1, 2, 3, 1, 2, 3,) rows, is it possible?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 06:33:18
问题 I want to order my results by client 1, 2, 3, then again client 1, 2, 3, and so on. Is there a way to do this without using a for loop or making three separate queries? Not only that, but I am working with paginated data so it needs to return x results, but consistently. Any ideas? GROUP BY maybe? client_id project_id project_name ---------- ---------- ------------ 1 42 project abc 2 49 project xyz 3 41 project 123 1 22 project apple 2 29 project orange 3 21 project banana 回答1: Use: SELECT x

Rank users in mysql by their points

守給你的承諾、 提交于 2019-11-27 06:24:14
问题 I am trying to rank my students by their points that I've calculated before but the problem is if students have same points they both should be in same rank E.g Student 1 has full points Student 2 has full points they both have to be rank as 1; Here an example of my database the query I am trying to do is (just for select then I can insert the values to my column) SELECT a.points count(b.points)+1 as rank FROM examresults a left join examresults b on a.points>b.points group by a.points; Edit