compute_expected_distance {BayesMallows} | R Documentation |
Expected value of metrics under a Mallows rank model
Description
Compute the expectation of several metrics under the Mallows rank model.
Usage
compute_expected_distance(
alpha,
n_items,
metric = c("footrule", "spearman", "cayley", "hamming", "kendall", "ulam")
)
Arguments
alpha |
Non-negative scalar specifying the scale (precision) parameter in the Mallows rank model. |
n_items |
Integer specifying the number of items. |
metric |
Character string specifying the distance measure to use.
Available options are |
Value
A scalar providing the expected value of the metric
under the
Mallows rank model with distance specified by the metric
argument.
See Also
Other rank functions:
compute_observation_frequency()
,
compute_rank_distance()
,
create_ranking()
,
get_mallows_loglik()
,
sample_mallows()
Examples
compute_expected_distance(1, 5, metric = "kendall")
compute_expected_distance(2, 6, metric = "cayley")
compute_expected_distance(1.5, 7, metric = "hamming")
compute_expected_distance(5, 30, "ulam")
compute_expected_distance(3.5, 45, "footrule")
compute_expected_distance(4, 10, "spearman")
[Package BayesMallows version 2.2.1 Index]