| consranktopk | R Documentation |
Find the median top-k list according to the Kemeny's axiomatic approach: the
consensus ranking in which k objects are ranked in strict order in the first k
positions and all the other objects are tied in the last position. It is the
median constrained bucket order with bucket sizes 1, ..., 1 (k times) and a
last bucket with the remaining objects (see mcbo with
bucketsizes = rep(1, k)). By default the solution is exact whenever
possible (see Details).
consranktopk(
X = NULL,
k,
wk = NULL,
ps = TRUE,
maxjudges = Inf,
cij = NULL,
nj = NULL,
algorithm = c("exact", "BOLT"),
maxcand = 22
)
X |
A N by M data matrix, in which there are N judges and M objects to be judged. Each row is a ranking of the objects which are represented by the columns. If X contains the rankings observed only once, the argument wk can be used. Either X or cij must be given |
k |
The number of objects of the top-k list: a whole number between 1 and M-1 (with k = M-1 the top-k list is a full ranking) |
wk |
Optional: the frequency of each ranking in the data |
ps |
Logical. If TRUE, displays information on screen. Default TRUE |
maxjudges |
Maximum number of distinct rankings of the judges used as starting solutions by BOLT, the most frequent first. Default Inf (all of them); 0 uses only the starting solutions computed from the combined input matrix |
cij |
The combined input matrix (M by M, see |
nj |
The number of judges (the sum of the weights, if any) that produced cij. Required when cij is given: it is used to compute the averaged TauX |
algorithm |
|
maxcand |
The largest number of candidate objects for the exact solution (default 22). The memory used grows as 2^maxcand (8 bytes times 2^maxcand: 32 MB with 22); at most 30 |
The objects of the top-k list are those for which the judges agree most on placing them in front of the others, and their order is the one that best agrees with the judges; the objects outside the list are tied, so that their mutual order does not matter. Like the other functions of the package, the solution maximizes the averaged TauX rank correlation coefficient with the rankings of the judges. The procedure is deterministic.
With the combined input matrix C (elements c_ij), the agreement of a top-k list with the judges is a constant plus
\sum_{t=1}^{k} g_{a_t} + 2 \sum_{s<t} c_{a_s a_t},
where a_1, \ldots, a_k are the objects of the list in order and
g_a = -2 \sum_{j \neq a} c_{ja} depends only on the column total of
the object a. With algorithm = "exact", the objects that cannot belong
to an optimal list are first removed, by two rules applied repeatedly: an
object of an optimal list cannot be improved by replacing it with an object
outside the list, and the value of a list containing the object, bounded from
above, must reach the value of a known list. The best list of the remaining
candidates is then found exactly by dynamic programming over their subsets with
at most k objects, and all the optimal lists are returned (at most 1000). The
first rule needs no known list; if the candidates are more than maxcand, the
BOLT solution is computed and used in the second rule; if they are still more
than maxcand, the BOLT solution is returned and Exact is FALSE.
A list containing the following components:
| TopK | the k objects of the median top-k list, in order (a matrix with one row per solution if there are several) | |
| Consensus | the consensus ranking(s) of all the objects, with the objects outside the top-k list tied in position k+1 | |
| Tau | averaged TauX rank correlation coefficient | |
| Exact | TRUE if the solution is certified optimal, FALSE if it is the BOLT solution | |
| Candidates | the number of objects that can belong to an optimal list (NA with algorithm = "BOLT") | |
| Eltime | elapsed time in seconds |
Antonio D'Ambrosio antdambr@unina.it
Emond, E. J., and Mason, D. W. (2002). A new rank correlation coefficient with application to the consensus ranking problem. Journal of Multi-Criteria Decision Analysis, 11(1), 17-28.
D'Ambrosio, A., Iorio, C., Staiano, M., and Siciliano, R. (2019). Median constrained bucket order rank aggregation. Computational Statistics, 34(2), 787-802. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s00180-018-0858-z")}
Romano, M., D'Ambrosio, A., and Conversano, C. A deterministic and scalable heuristic for median ranking detection: tie-aware local search with optimal tie partitioning on the combined input matrix. Manuscript under review.
mcbo for bucket orders with a given number of buckets or
a given pattern of bucket sizes
consrank for the unconstrained median ranking
bolt for the BOLT algorithm
data(EMD)
CR <- consranktopk(EMD[, 1:15], k = 3, wk = EMD[, 16])
CR$TopK
CR$Tau
CR$Exact
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.