smc_mallows_new_users | R Documentation |
Function to perform resample-move SMC algorithm where we receive new users with complete rankings at each time step. See Chapter 4 of \insertCitesteinSequentialInferenceMallows2023BayesMallows
smc_mallows_new_users(
R_obs,
type,
n_items,
N,
Time,
mcmc_kernel_app,
num_new_obs,
alpha_prop_sd = 0.5,
lambda = 0.1,
alpha_max = 1e+06,
alpha = 0,
aug_method = "random",
logz_estimate = NULL,
cardinalities = NULL,
verbose = FALSE,
metric = "footnote",
leap_size = 1L
)
R_obs |
Matrix containing the full set of observed rankings of size n_assessors by n_items |
type |
One of |
n_items |
Integer is the number of items in a ranking |
N |
Integer specifying the number of particles |
Time |
Integer specifying the number of time steps in the SMC algorithm |
mcmc_kernel_app |
Integer value for the number of applications we apply the MCMC move kernel |
num_new_obs |
Integer value for the number of new observations (complete rankings) for each time step |
alpha_prop_sd |
Numeric value specifying the standard deviation of the
lognormal proposal distribution used for |
lambda |
Strictly positive numeric value specifying the rate parameter
of the truncated exponential prior distribution of |
alpha_max |
Maximum value of |
alpha |
A numeric value of the scale parameter which is known and fixed. |
aug_method |
A character string specifying the approach for filling in the missing data, options are "pseudolikelihood" or "random". |
logz_estimate |
Estimate of the partition function, computed with
|
cardinalities |
Cardinalities for exact evaluation of partition function,
returned from |
verbose |
Logical specifying whether to print out the progress of the
SMC-Mallows algorithm. Defaults to |
metric |
A character string specifying the distance metric to use
in the Bayesian Mallows Model. Available options are |
leap_size |
leap_size Integer specifying the step size of the leap-and-shift proposal distribution |
a set of particles each containing a value of rho and alpha
Other modeling:
compute_mallows_mixtures()
,
compute_mallows()
,
smc_mallows_new_item_rank()
# Generate basic elements
data <- sushi_rankings[1:100, ]
n_items <- ncol(sushi_rankings)
metric <- "footrule"
num_new_obs <- 10
# Prepare exact partition function
cardinalities <- prepare_partition_function(metric = metric,
n_items = n_items)$cardinalities
# Calculating rho and alpha samples
samples <- smc_mallows_new_users(
R_obs = data, type = "complete", n_items = n_items, metric = metric,
leap_size = floor(n_items / 5), N = 100, Time = nrow(data) / num_new_obs,
mcmc_kernel_app = 5, cardinalities = cardinalities,
alpha_prop_sd = 0.1, lambda = 0.001, alpha_max = 1e6,
num_new_obs = num_new_obs, verbose = TRUE
)
# Studying the structure of the output
str(samples)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.