Learn R Programming

BayesMallows (version 2.2.6)

Bayesian Preference Learning with the Mallows Rank Model

Description

An implementation of the Bayesian version of the Mallows rank model (Vitelli et al., Journal of Machine Learning Research, 2018 ; Crispino et al., Annals of Applied Statistics, 2019 ; Sorensen et al., R Journal, 2020 ; Stein, PhD Thesis, 2023 ). Both Metropolis-Hastings and sequential Monte Carlo algorithms for estimating the models are available. Cayley, footrule, Hamming, Kendall, Spearman, and Ulam distances are supported in the models. The rank data to be analyzed can be in the form of complete rankings, top-k rankings, partially missing rankings, as well as consistent and inconsistent pairwise preferences. Several functions for plotting and studying the posterior distributions of parameters are provided. The package also provides functions for estimating the partition function (normalizing constant) of the Mallows rank model, both with the importance sampling algorithm of Vitelli et al. and asymptotic approximation with the IPFP algorithm (Mukherjee, Annals of Statistics, 2016 ).

Copy Link

Version

Install

install.packages('BayesMallows')

Monthly Downloads

1,201

Version

2.2.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Oystein Sorensen

Last Published

November 25th, 2025

Functions in BayesMallows (2.2.6)

estimate_partition_function

Estimate Partition Function
get_mallows_loglik

Likelihood and log-likelihood evaluation for a Mallows mixture model
get_transitive_closure

Get transitive closure
potato_true_ranking

True ranking of the weights of 20 potatoes.
plot_top_k

Plot Top-k Rankings with Pairwise Preferences
predict_top_k

Predict Top-k Rankings with Pairwise Preferences
get_acceptance_ratios

Get Acceptance Ratios
get_cardinalities

Get cardinalities for each distance
print.BayesMallows

Print Method for BayesMallows Objects
potato_visual

Potato weights assessed visually
sample_mallows

Random Samples from the Mallows Rank Model
potato_weighing

Potato weights assessed by hand
set_model_options

Set options for Bayesian Mallows model
heat_plot

Heat plot of posterior probabilities
rmallows

Sample from the Mallows distribution.
plot.BayesMallows

Plot Posterior Distributions
set_initial_values

Set initial values of scale parameter and modal ranking
set_compute_options

Specify options for computation
sushi_rankings

Sushi rankings
sample_prior

Sample from prior distribution
update_mallows

Update a Bayesian Mallows model with new users
set_smc_options

Set SMC compute options
setup_rank_data

Setup rank data
plot.SMCMallows

Plot SMC Posterior Distributions
sounds

Sounds data
plot_elbow

Plot Within-Cluster Sum of Distances
set_priors

Set prior parameters for Bayesian Mallows model
set_progress_report

Set progress report options for MCMC algorithm
asymptotic_partition_function

Asymptotic Approximation of Partition Function
cluster_data

Simulated clustering data
assign_cluster

Assign Assessors to Clusters
burnin

See the burnin
assess_convergence

Trace Plots from Metropolis-Hastings Algorithm
burnin<-

Set the burnin
compute_consensus

Compute Consensus Ranking
compute_posterior_intervals

Compute Posterior Intervals
compute_exact_partition_function

Compute exact partition function
compute_mallows

Preference Learning with the Mallows Rank Model
create_ranking

Convert between ranking and ordering.
compute_mallows_mixtures

Compute Mixtures of Mallows Models
compute_observation_frequency

Frequency distribution of the ranking sequences
compute_rank_distance

Distance between a set of rankings and a given rank sequence
beach_preferences

Beach preferences
bernoulli_data

Simulated intransitive pairwise preferences
compute_mallows_sequentially

Estimate the Bayesian Mallows Model Sequentially
BayesMallows-package

BayesMallows: Bayesian Preference Learning with the Mallows Rank Model
compute_expected_distance

Expected value of metrics under a Mallows rank model