spearman: Modified Spearman's footrule distance

Description Usage Arguments Value Author(s) See Also Examples

Description

Spearman's footrule is a measure for distance between ranked lists. It is given as the sum of absolute differences between ranks of two lists. Here a modified version is implemented that allows for comparing partial lists.

Usage

1
Spearman(rank.a, rank.b, k.a, k.b, n)

Arguments

rank.a

A single top-k list

rank.b

A vector of matrix form of top-k list(s) to be compared to the list a

k.a

Value of k for rank.a

k.b

Value of k for rank.b

n

Total number of objects, numbered from 1 to n

Value

Returns modified Spearman distance against a for each lists within b

Author(s)

Jie Ding <jding@jimmy.harvard.edu>

See Also

Kendall2Lists

Examples

1
2
3
4
set.seed(1234)
a <- sample(1:10, 10)
b <- sample(1:10, 10)
Spearman(a, b, 6, 6, 10)

TopKLists documentation built on May 2, 2019, 4:41 p.m.