Description Usage Arguments Value Author(s) References Examples
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.
1 2 | kendall_weight(x, y, method = c("aken", "ken", "top", "add", "mult"),
k = NULL, u = NULL, normalized = TRUE)
|
x, y |
Vector.
If |
method |
Character. The method to perform weighted Kendall kernel. Choices include
|
k |
Integer. The parameter in top- |
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 |
Weighted Kendall kernel for total rankings, where ties (supposed few) are broken by adopting a convolution kernel averaging compatible rankings without ties.
Yunlong Jiao
Yunlong Jiao, Jean-Philippe Vert. "The Weighted Kendall and High-order Kernels for Permutations." arXiv preprint arXiv:1802.08526, 2018. arXiv:1802.08526
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.