Compute the logarithm of the expected distance of metrics for a Mallows rank model
log_expected_dist(alpha, n_items, cardinalities, metric)
The value of the alpha parameter.
Number of items.
Number of occurrences for each unique distance. Applicable for Footrule and Spearman distance.
A string. Available options are "ulam"
, "footrule"
and "spearman"
.
A scalar, the logarithm of the partition function.