scoreRankings: Score the Comparison of two Rankings

Description Usage Arguments Details Value Author(s) See Also

View source: R/compareLists.R

Description

Two rankings are accepted as input in the form of corresponding ranks in two lists. The weighted overlap score is computed efficiently without explicitly computing overlaps.

Usage

1
scoreRankings(r1, r2, nn, bases, two.sided=TRUE)

Arguments

r1

integer, ranks in the first list.

r2

integer, ranks in the second list. r1 and r2 must have the same length.

nn

for each alpha to be used as weighting parameter, this array of integers contains the maximal rank for which overlaps are considered.

bases

for each alpha to be used as weighting parameter, this double array contains exp(-alpha).

two.sided

if TRUE both ends of the lists are taken into account, only top ranks are considered otherwise.

Details

The score to be computed is defined as the sum over the first ranks in two lists. The summed up measure is the weighted overlap between the two lists:

score := sum_(R=1)^n exp(-alpha R) * overlap(L1[1:R],L2[1:R])

where n is the maximal rank to be considered and L1/L2 denote the sorted lists to be compared. In this score, each gene contributes from the first rank where it is in the overlap up to n. For gene i:

score_i = sum_(R=max(r1[i],r2[i])^n exp(-alpha R))

where r1/r2 are the ranks of genes in L1/L2. Since this is a finite geometric series, it can be used to speed up computation of our score:

score_i = (exp(-alpha min(r1[i],r2[i])) - exp(-alpha n))/(1 - exp(-alpha))

score = sum_(i|r1[i]<n&r2[i]<n) score_i

Analogue computations are performed by scoreRankings for list begins and list ends.

Value

An array of doubles with one score per weighting parameter to be considered is returned.

Author(s)

Claudio Lottaz

See Also

shuffledRandomScores,compareLists


OrderedList documentation built on Nov. 8, 2020, 5:41 p.m.