Learn R Programming

BayesMallows (version 2.2.5)

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

944

Version

2.2.5

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Oystein Sorensen

Last Published

June 27th, 2025

Functions in BayesMallows (2.2.5)

create_ranking

Convert between ranking and ordering.
compute_expected_distance

Expected value of metrics under a Mallows rank model
compute_exact_partition_function

Compute exact partition function
plot_elbow

Plot Within-Cluster Sum of Distances
plot.SMCMallows

Plot SMC Posterior Distributions
compute_observation_frequency

Frequency distribution of the ranking sequences
compute_mallows_sequentially

Estimate the Bayesian Mallows Model Sequentially
heat_plot

Heat plot of posterior probabilities
plot.BayesMallows

Plot Posterior Distributions
sample_prior

Sample from prior distribution
print.BayesMallows

Print Method for BayesMallows Objects
predict_top_k

Predict Top-k Rankings with Pairwise Preferences
set_compute_options

Specify options for computation
get_mallows_loglik

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

Potato weights assessed visually
get_transitive_closure

Get transitive closure
plot_top_k

Plot Top-k Rankings with Pairwise Preferences
set_model_options

Set options for Bayesian Mallows model
set_initial_values

Set initial values of scale parameter and modal ranking
compute_mallows_mixtures

Compute Mixtures of Mallows Models
compute_mallows

Preference Learning with the Mallows Rank Model
update_mallows

Update a Bayesian Mallows model with new users
potato_true_ranking

True ranking of the weights of 20 potatoes.
sushi_rankings

Sushi rankings
get_acceptance_ratios

Get Acceptance Ratios
estimate_partition_function

Estimate Partition Function
sounds

Sounds data
potato_weighing

Potato weights assessed by hand
get_cardinalities

Get cardinalities for each distance
set_smc_options

Set SMC compute options
sample_mallows

Random Samples from the Mallows Rank Model
set_progress_report

Set progress report options for MCMC algorithm
set_priors

Set prior parameters for Bayesian Mallows model
rmallows

Sample from the Mallows distribution.
setup_rank_data

Setup rank data
burnin<-

Set the burnin
asymptotic_partition_function

Asymptotic Approximation of Partition Function
burnin

See the burnin
compute_consensus

Compute Consensus Ranking
assign_cluster

Assign Assessors to Clusters
beach_preferences

Beach preferences
bernoulli_data

Simulated intransitive pairwise preferences
cluster_data

Simulated clustering data
BayesMallows-package

BayesMallows: Bayesian Preference Learning with the Mallows Rank Model
assess_convergence

Trace Plots from Metropolis-Hastings Algorithm
compute_posterior_intervals

Compute Posterior Intervals
compute_rank_distance

Distance between a set of rankings and a given rank sequence