mod_kemeny | R Documentation |
Modified Kemeny algorithm determines the consensus ranking of n
objects using
the set of all possible rankings compared to the input rankings. The algorithm is based on
Kemeny's axiomatic approach of minimizing the total Kemeny distance from the input rankings.
In case of multiple rankings with minimum total Kemeny distance, the consensus ranking is
determined using two additional criteria. See ‘Details’ for additional criteria.
The method involves n
! comparisons. Hence, it works best on a set of rankings with a small
number of objects.
mod_kemeny(input_rkgs, universe_rkgs, obj_pairs, wt)
input_rkgs |
a |
universe_rkgs |
a matrix containing all possible permutations of ranking n objects. Each row in this matrix represents one permuted ranking. |
obj_pairs |
a |
wt |
a |
Under Kemeny's axiomatic approach, rankings with minimum total Kemeny distance are considered equally optimal. Modified Kemeny attempts to break the tie among such rankings by imposing two additional criteria on the basis of minimizing (a) the maximum and (b) the variance of individual Kemeny distances, applied sequentially.
A list containing the consensus ranking (expressed as ordering), total Kemeny distance, and average tau correlation coefficient corresponding to the consensus ranking.
Badal, P. S., & Das, A. (2018). Efficient algorithms using subiterative convergence for Kemeny ranking problem. Computers & Operations Research, 98, 198-210. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.cor.2018.06.007")}
## Consensus ranking from four rankings of five objects
n <- 5
input_rkgs <- matrix(c(3, 2, 5, 1, 2, 3, 1, 2, 5, 1, 3, 4, 4, 5, 4, 5, 1, 4, 2, 3), ncol = n)
uni_rkgs <- matrix(unlist(combinat::permn(c(1:n))), byrow = TRUE, ncol = n)
obj_pairs <- combinat::combn(1:n,2, simplify=TRUE)
wt <- rep(1,nrow(input_rkgs))
mod_kemeny(input_rkgs, uni_rkgs, obj_pairs,wt=wt) # Computed consensus ranking,
# total Kemeny distance,
#and average tau correlation coefficient
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.