Learn R Programming

BayesMallows (version 1.1.0)

get_partition_function: Compute the logarithm of the partition function for a Mallows rank model

Description

Compute the logarithm of the partition function for a Mallows rank model

Usage

get_partition_function(
  n_items,
  alpha,
  cardinalities = NULL,
  logz_estimate = NULL,
  metric = "footrule"
)

Arguments

n_items

Number of items.

alpha

The value of the alpha parameter.

cardinalities

Number of occurrences for each unique distance. Applicable for Footrule and Spearman distance. Defaults to R_NilValue.

logz_estimate

Precomputed importance sampling fit.

metric

A string. Available options are "footrule", "kendall", "spearman", "cayley", "hamming", and "ulam". Defaults to "footrule".

Value

A scalar, the logarithm of the partition function.

References