kendall_weight: Weighted Kendall kernel for total rankings

Description Usage Arguments Value Author(s) References Examples

Description

Calculates weighted Kendall kernel between total rankings in time O(nlogn), where ties (supposed few) are broken by adopting a convolution kernel averaging compatible rankings without ties.

Usage

1
2
kendall_weight(x, y, method = c("aken", "ken", "top", "add", "mult"),
  k = NULL, u = NULL, normalized = TRUE)

Arguments

x, y

Vector. If x is numeric, the rank vector converted from x indicate that larger values mean being preferred. NAs are not allowed.

method

Character. The method to perform weighted Kendall kernel. Choices include

  • aken denotes the Average Kendall kernel.

  • ken denotes the standard Kendall kernel.

  • top denotes the TOP-k Kendall kernel.

  • add denotes weighted Kendall kernel with ADDitive weights.

  • mult denotes weighted Kendall kernel with MULTiplicative weights.

k

Integer. The parameter in top-k Kendall kernel. Top-k implies ranks larger than k, where larger ranks mean being more preferred.

u

Numeric vector. The parameter in additive or multiplicative weighted Kendall kernel.

normalized

Logical. Whether to normalize the output kernel value. The weighted Kendall kernel elaborated in Jiao and Vert (2018) corresponds to the non-normalized version by setting normalized=FALSE.

Value

Weighted Kendall kernel for total rankings, where ties (supposed few) are broken by adopting a convolution kernel averaging compatible rankings without ties.

Author(s)

Yunlong Jiao

References

Yunlong Jiao, Jean-Philippe Vert. "The Weighted Kendall and High-order Kernels for Permutations." arXiv preprint arXiv:1802.08526, 2018. arXiv:1802.08526

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
x <- c(1.5, 0.1, 0, -4, 0)
y <- c(0, 0, 0, 3, 0)

# Average Kendall kernel
kendall_weight(x, y, method = "aken")

# Top-1 Kendall kernel is equiv to Standard Kendall kernel
kendall_weight(x, y, method = "ken")
kendall_weight(x, y, method = "top", k = 1)

# Additive/multiplicative weights with hyperbolic reduction factor
u <- 1/(length(x):1 + 1)
kendall_weight(x, y, method = "add", u = u)
kendall_weight(x, y, method = "mult", u = u)

# NOTE: In case of ties, standard Kendall kernel implemented by kendall_weight
# is NOT equiv to kendall_total due to different normalization technique!
# kendall_weight breaks ties by averaging over compatible full rankings:
kendall_weight(x, y, method = "ken", normalized = TRUE)
# kendall_total implements type-b of Kendall's tau that handles ties per se:
kendall_total(x, y)

YunlongJiao/kernrank documentation built on May 10, 2019, 1:13 a.m.