Learn R Programming

BayesMallows (version 2.2.3)

set_initial_values: Set initial values of scale parameter and modal ranking

Description

Set initial values used by the Metropolis-Hastings algorithm.

Usage

set_initial_values(rho_init = NULL, alpha_init = 1)

Value

An object of class "BayesMallowsInitialValues", to be provided to the initial_values argument of compute_mallows() or compute_mallows_mixtures().

Arguments

rho_init

Numeric vector specifying the initial value of the latent consensus ranking \(\rho\). Defaults to NULL, which means that the initial value is set randomly. If rho_init is provided when n_clusters > 1, each mixture component \(\rho_{c}\) gets the same initial value.

alpha_init

Numeric value specifying the initial value of the scale parameter \(\alpha\). Defaults to 1. When n_clusters > 1, each mixture component \(\alpha_{c}\) gets the same initial value. When chains are run in parallel, by providing an argument cl = cl, then alpha_init can be a vector of of length length(cl), each element of which becomes an initial value for the given chain.

See Also

Other preprocessing: get_transitive_closure(), set_compute_options(), set_model_options(), set_priors(), set_progress_report(), set_smc_options(), setup_rank_data()