Set parameters related to the Metropolis-Hastings algorithm.
set_compute_options(
nmc = 2000,
burnin = NULL,
alpha_prop_sd = 0.1,
rho_proposal = c("ls", "swap"),
leap_size = 1,
aug_method = c("uniform", "pseudo"),
pseudo_aug_metric = c("footrule", "spearman"),
swap_leap = 1,
alpha_jump = 1,
aug_thinning = 1,
clus_thinning = 1,
rho_thinning = 1,
include_wcd = FALSE,
save_aug = FALSE,
save_ind_clus = FALSE
)
An object of class "BayesMallowsComputeOptions"
, to be provided in
the compute_options
argument to compute_mallows()
,
compute_mallows_mixtures()
, or update_mallows()
.
Integer specifying the number of iteration of the
Metropolis-Hastings algorithm to run. Defaults to 2000
. See
assess_convergence()
for tools to check convergence of the Markov chain.
Integer defining the number of samples to discard. Defaults to
NULL
, which means that burn-in is not set.
Numeric value specifying the \(\sigma\) parameter of
the lognormal proposal distribution used for \(\alpha\) in the
Metropolis-Hastings algorithm. The logarithm of the proposed samples will
have standard deviation given by alpha_prop_sd
. Defaults to 0.1
.
Character string specifying the proposal distribution of modal ranking \(\rho\). Defaults to "ls", which means that the leap-and-shift algorithm of vitelli2018;textualBayesMallows is used. The other option is "swap", which means that the swap proposal of crispino2019;textualBayesMallows is used instead.
Integer specifying the step size of the distribution defined
in rho_proposal
for proposing new latent ranks \(rho\). Defaults to 1.
Augmentation proposal for use with missing data. One of "pseudo" and "uniform". Defaults to "uniform", which means that new augmented rankings are proposed by sampling uniformly from the set of available ranks, see Section 4 in vitelli2018;textualBayesMallows. Setting the argument to "pseudo" instead, means that the pseudo-likelihood proposal defined in Chapter 5 of steinSequentialInferenceMallows2023;textualBayesMallows is used instead.
String defining the metric to be used in the
pseudo-likelihood proposal. Only used if aug_method = "pseudo"
. Can be
either "footrule" or "spearman", and defaults to "footrule".
Integer specifying the leap size for the swap proposal used
for proposing latent ranks in the case of non-transitive pairwise
preference data. Note that leap size for the swap proposal when used for
proposal the modal ranking \(\rho\) is given by the leap_size
argument above.
Integer specifying how many times to sample \(\rho\)
between each sampling of \(\alpha\). In other words, how many times to
jump over \(\alpha\) while sampling \(\rho\), and possibly other
parameters like augmented ranks \(\tilde{R}\) or cluster assignments
\(z\). Setting alpha_jump
to a high number can speed up computation
time, by reducing the number of times the partition function for the
Mallows model needs to be computed. Defaults to 1
.
Integer specifying the thinning for saving augmented
data. Only used when save_aug = TRUE
. Defaults to 1
.
Integer specifying the thinning to be applied to cluster
assignments and cluster probabilities. Defaults to 1
.
Integer specifying the thinning of rho
to be performed
in the Metropolis- Hastings algorithm. Defaults to 1
. compute_mallows
save every rho_thinning
th value of \(\rho\).
Logical indicating whether to store the within-cluster
distances computed during the Metropolis-Hastings algorithm. Defaults to
FALSE
. Setting include_wcd = TRUE
is useful when deciding the number of
mixture components to include, and is required by plot_elbow()
.
Logical specifying whether or not to save the augmented
rankings every aug_thinning
th iteration, for the case of missing data or
pairwise preferences. Defaults to FALSE
. Saving augmented data is useful
for predicting the rankings each assessor would give to the items not yet
ranked, and is required by plot_top_k()
.
Whether or not to save the individual cluster
probabilities in each step. This results in csv files cluster_probs1.csv
,
cluster_probs2.csv
, ..., being saved in the calling directory. This
option may slow down the code considerably, but is necessary for detecting
label switching using Stephen's algorithm.
Other preprocessing:
get_transitive_closure()
,
set_initial_values()
,
set_model_options()
,
set_priors()
,
set_progress_report()
,
set_smc_options()
,
setup_rank_data()