Learn R Programming

BayesMallows (version 1.1.0)

expected_dist: Expected value of metrics under a Mallows rank model

Description

Compute the expectation of several metrics under the Mallows rank model.

Usage

expected_dist(alpha, n_items, metric)

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 "kendall", "cayley", "hamming", "ulam" for n_items<=95, "footrule" for n_items<=50 and "spearman" for n_items<=14.

Value

A scalar providing the expected value of the metric under the Mallows rank model with distance specified by the metric argument.

Examples

Run this code
# NOT RUN {
expected_dist(1,5,metric="kendall")
expected_dist(2,6,metric="cayley")
expected_dist(1.5,7,metric="hamming")
expected_dist(5,30,"ulam")
expected_dist(3.5,45,"footrule")
expected_dist(4,10,"spearman")
# }

Run the code above in your browser using DataLab