I need to use a measure to compare two rankings:
Consider the ground truth as 1,2,3,4,5,6
. Let two rankings be R1
and R2
.
R1: 1,2,3,6,4,5
R2: 1,4,2,3,5,6
From Wikipedia Kendall's tau ranking correlation coefficient is given by:
$$
\frac{\text{Number of Concordant Pairs - Number of Discordant Pairs}}{(n(n-1)/2) }
$$
Calculation of Kendall's tau for R1
:
Number of Concordant Pairs = 15
Number of Discordant Pairs = 2
Similarly for R2
:
Number of Concordant Pairs = 15
Number of Discordant Pairs = 2
Thus, although the Kendall's correlation coefficient is same for both the lists, I want to penalise R2
more as the differences in position is towards the head than tail. Thus, along with the ranking, I also want to take into consideration the position. Is there a well defined measure for this? How can this be done?