mod_kemeny: Modified Kemeny Rank Aggregation

View source: R/mod_kemeny.R

mod_kemenyR Documentation

Modified Kemeny Rank Aggregation

Description

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.

Usage

mod_kemeny(input_rkgs, universe_rkgs, obj_pairs, wt)

Arguments

input_rkgs

a k by n matrix of k rankings of n objects, where each row is a complete ranking. Note that this is a transpose of matrix used for functions like fur, sigfur, rap_greedy_alg, and subit_convergence.

universe_rkgs

a matrix containing all possible permutations of ranking n objects. Each row in this matrix represents one permuted ranking.

obj_pairs

a 2 by n choose 2 matrix of all combinations of object pairs of n objects, where each column contains a pair of object indices.

wt

a k-length vector containing weights for each judge or attribute. An optional parameter.

Details

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.

Value

A list containing the consensus ranking (expressed as ordering), total Kemeny distance, and average tau correlation coefficient corresponding to the consensus ranking.

References

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")}

Examples

## 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


RankAggSIgFUR documentation built on July 9, 2023, 7:26 p.m.