predict_top_k | R Documentation |
Predict the posterior probability, per item, of being ranked among the
top-k
for each assessor. This is useful when the data take the form of
pairwise preferences.
predict_top_k(model_fit, burnin = model_fit$burnin, k = 3)
model_fit |
An object of type |
burnin |
A numeric value specifying the number of iterations to discard
as burn-in. Defaults to |
k |
Integer specifying the k in top- |
A dataframe with columns assessor
, item
, and
prob
, where each row states the probability that the given assessor
rates the given item among top-k
.
plot_top_k
Other posterior quantities:
assign_cluster()
,
compute_consensus.BayesMallows()
,
compute_consensus.SMCMallows()
,
compute_consensus()
,
compute_posterior_intervals.BayesMallows()
,
compute_posterior_intervals.SMCMallows()
,
compute_posterior_intervals()
,
heat_plot()
,
plot.BayesMallows()
,
plot.SMCMallows()
,
plot_elbow()
,
plot_top_k()
,
print.BayesMallowsMixtures()
,
print.BayesMallows()
## Not run:
# We use the example dataset with beach preferences. Se the documentation to
# compute_mallows for how to assess the convergence of the algorithm
# We need to save the augmented data, so setting this option to TRUE
model_fit <- compute_mallows(preferences = beach_preferences,
save_aug = TRUE)
# We set burnin = 1000
model_fit$burnin <- 1000
# By default, the probability of being top-3 is plotted
plot_top_k(model_fit)
# We can also plot the probability of being top-5, for each item
plot_top_k(model_fit, k = 5)
# We get the underlying numbers with predict_top_k
probs <- predict_top_k(model_fit)
# To find all items ranked top-3 by assessors 1-3 with probability more than 80 %,
# we do
subset(probs, assessor %in% 1:3 & prob > 0.8)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.