get_rank_distance | R Documentation |
Compute the distance between two rankings according to several metrics.
get_rank_distance(r1, r2, metric)
r1 |
A vector of ranks. |
r2 |
A vector of ranks. |
metric |
A string. Available options are |
Note that the Spearman distance is the squared L2 norm, whereas the footrule distance is the L1 norm.
The Ulam distance uses the SUBSET library developed by John Burkardt, available at http://people.sc.fsu.edu/~jburkardt/cpp_src/subset/subset.html.
The implementation of Cayley distance is based on a C++
translation of Rankcluster::distCayley
\insertCiteGrimonprez2016BayesMallows.
A scalar.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.