Learn R Programming

⚠️There's a newer version (2.2.3) of this package.Take me there.

BayesMallows (version 1.5.0)

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

784

Version

1.5.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Oystein Sorensen

Last Published

November 25th, 2023

Functions in BayesMallows (1.5.0)

BayesMallows

BayesMallows: Bayesian Preference Learning with the Mallows Rank Model.
assess_convergence

Trace Plots from Metropolis-Hastings Algorithm
compute_posterior_intervals.BayesMallows

Compute posterior intervals
compute_mallows_mixtures

Compute Mixtures of Mallows Models
compute_posterior_intervals_alpha

Compute Posterior Intervals Alpha
compute_posterior_intervals_rho

Compute Posterior Intervals Rho
heat_plot

Heat plot of posterior probabilities
generate_initial_ranking

Generate Initial Ranking
generate_transitive_closure

Generate Transitive Closure
assign_cluster

Assign Assessors to Clusters
asymptotic_partition_function

Asymptotic Approximation of Partition Function
compute_importance_sampling_estimate

Compute importance sampling estimates of log partition function for footrule and Spearman distances.
label_switching

Checking for Label Switching in the Mallows Mixture Model
calculate_backward_probability

Calculate Backward Probability
compute_rho_consensus

Compute rho consensus
correction_kernel

Correction Kernel
expected_dist

Expected value of metrics under a Mallows rank model
plot.SMCMallows

Plot SMC Posterior Distributions
plot_top_k

Plot Top-k Rankings with Pairwise Preferences
get_mallows_loglik

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

Compute Posterior Intervals
plot_elbow

Plot Within-Cluster Sum of Distances
predict_top_k

Predict Top-k Rankings with Pairwise Preferences
compute_mallows

Preference Learning with the Mallows Rank Model
get_rank_distance

Compute the Distance between two rankings
sample_mallows

Random Samples from the Mallows Rank Model
potato_true_ranking

True ranking of the weights of 20 potatoes.
print.BayesMallows

Print Method for BayesMallows Objects
smc_mallows_new_item_rank

SMC-Mallows new item rank
print.BayesMallowsMixtures

Print Method for BayesMallowsMixtures Objects
compute_posterior_intervals.SMCMallows

Compute posterior intervals
correction_kernel_pseudo

Correction Kernel (pseudolikelihood)
generate_constraints

Generate Constraint Set from Pairwise Comparisons
potato_visual

Result of ranking potatoes by weight, where the assessors were only allowed to inspected the potatoes visually. 12 assessors ranked 20 potatoes.
estimate_partition_function

Estimate Partition Function
potato_weighing

Result of ranking potatoes by weight, where the assessors were allowed to lift the potatoes. 12 assessors ranked 20 potatoes.
obs_freq

Observation frequencies in the Bayesian Mallows model
prepare_partition_function

Prepare partition functions
plot.BayesMallows

Plot Posterior Distributions
rank_conversion

Convert between ranking and ordering.
rank_distance

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

Frequency distribution of the ranking sequences
rmallows

Sample from the Mallows distribution.
run_mcmc

Worker function for computing the posterior distribution.
smc_mallows_new_users

SMC-Mallows New Users
sushi_rankings

Sushi Rankings
sample_dataset

A synthetic 3D matrix generated using the sample_mallows function
compute_consensus.BayesMallows

Compute Consensus Ranking
calculate_forward_probability

Calculate Forward Probability
compute_consensus

Compute Consensus Ranking
beach_preferences

Beach Preferences
compute_consensus.SMCMallows

Compute Consensus Ranking