kInverse | R Documentation |
This function attempts to reverse Kendall transformation using a simple ranking agreement method, which always restores original ranking if the input corresponds to one, or a reasonable best-effort guess if not.
Namely, each objects gets a score based on its relation with each other object, 2 points for a win ('>'
) and 1 point for a tie ('='
); these scores are used to calculate ranks.
This function can also be directly given greater-than scores, for instance confidence scores from some classifier trained on Kendall-transformed data.
kInverse(x)
x |
A Kendall-transformed feature to be converted back into a ranking.
To be interpreted as a such, it must be a factor with levels being a subset of |
Vector of ranks corresponding to x
.
An order of elements in x
is crucial; if it is not the same as generated by the kTransform
, results will be wrong.
This function cannot assert that the order is correct.
"Kendall transformation brings a robust categorical representation of ordinal data" M.B. Kursa. SciRep 12, 8341 (2022).
kInverse(kTransform(1:7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.