set_smc_options: Set SMC compute options

View source: R/set_smc_options.R

set_smc_optionsR Documentation

Set SMC compute options

Description

Sets the SMC compute options to be used in update_mallows.BayesMallows().

Usage

set_smc_options(
  n_particles = 1000,
  mcmc_steps = 5,
  resampler = c("stratified", "systematic", "residual", "multinomial"),
  latent_sampling_lag = NA_integer_,
  max_topological_sorts = 1
)

Arguments

n_particles

Integer specifying the number of particles.

mcmc_steps

Number of MCMC steps to be applied in the resample-move step.

resampler

Character string defining the resampling method to use. One of "stratified", "systematic", "residual", and "multinomial". Defaults to "stratified". While multinomial resampling was used in \insertCitesteinSequentialInferenceMallows2023;textualBayesMallows, stratified, systematic, or residual resampling typically give lower Monte Carlo error \insertCiteDouc2005,Hol2006,Naesseth2019BayesMallows.

latent_sampling_lag

Parameter specifying the number of timesteps to go back when resampling the latent ranks in the move step. See Section 6.2.3 of \insertCiteKantas2015BayesMallows for details. The L in their notation corresponds to latent_sampling_lag. See more under Details. Defaults to NA, which means that all latent ranks from previous timesteps are moved. If set to 0, no move step is applied to the latent ranks.

max_topological_sorts

User when pairwise preference data are provided, and specifies the maximum number of topological sorts of the graph corresponding to the transitive closure for each user will be used as initial ranks. Defaults to 1, which means that all particles get the same initial augmented ranking. If larger than 1, the initial augmented ranking for each particle will be sampled from a set of maximum size max_topological_sorts. If the actual number of topological sorts consists of fewer rankings, then this determines the upper limit.

Value

An object of class "SMCOptions".

Lag parameter in move step

The parameter latent_sampling_lag corresponds to L in \insertCiteKantas2015BayesMallows. Its use in this package is can be explained in terms of Algorithm 12 in \insertCitesteinSequentialInferenceMallows2023BayesMallows. The relevant line of the algorithm is:

for j = 1 : M_{t} do
M-H step: update \tilde{\mathbf{R}}_{j}^{(i)} with proposal \tilde{\mathbf{R}}_{j}' \sim q(\tilde{\mathbf{R}}_{j}^{(i)} | \mathbf{R}_{j}, \boldsymbol{\rho}_{t}^{(i)}, \alpha_{t}^{(i)}).
end

Let L denote the value of latent_sampling_lag. With this parameter, we modify for algorithm so it becomes

for j = M_{t-L+1} : M_{t} do
M-H step: update \tilde{\mathbf{R}}_{j}^{(i)} with proposal \tilde{\mathbf{R}}_{j}' \sim q(\tilde{\mathbf{R}}_{j}^{(i)} | \mathbf{R}_{j}, \boldsymbol{\rho}_{t}^{(i)}, \alpha_{t}^{(i)}).
end

This means that with L=0 no move step is performed on any latent ranks, whereas L=1 means that the move step is only applied to the parameters entering at the given timestep. The default, latent_sampling_lag = NA means that L=t at each timestep, and hence all latent ranks are part of the move step at each timestep.

References

\insertAllCited

See Also

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


BayesMallows documentation built on Sept. 11, 2024, 5:31 p.m.