Learn R Programming

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

BayesMallows (version 1.4.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

944

Version

1.4.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Oystein Sorensen

Last Published

October 4th, 2023

Functions in BayesMallows (1.4.0)

BayesMallows

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

Calculate Backward Probability
assess_convergence

Trace Plots from Metropolis-Hastings Algorithm
compute_rho_consensus

Compute rho consensus
compute_importance_sampling_estimate

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

Assign Assessors to Clusters
correction_kernel

Correction Kernel
asymptotic_partition_function

Asymptotic Approximation of Partition Function
compute_mallows

Preference Learning with the Mallows Rank Model
compute_mallows_mixtures

Compute Mixtures of Mallows Models
compute_posterior_intervals_alpha

Compute Posterior Intervals Alpha
compute_posterior_intervals.BayesMallows

Compute posterior intervals
compute_posterior_intervals_rho

Compute Posterior Intervals Rho
generate_constraints

Generate Constraint Set from Pairwise Comparisons
generate_transitive_closure

Generate Transitive Closure
estimate_partition_function

Estimate Partition Function
expected_dist

Expected value of metrics under a Mallows rank model
get_exponent_sum

Get exponent in Mallows log-likelihood
generate_initial_ranking

Generate Initial Ranking
compute_posterior_intervals

Compute Posterior Intervals
compute_posterior_intervals.SMCMallows

Compute posterior intervals
get_partition_function

Compute the logarithm of the partition function for a Mallows rank model
get_mallows_loglik

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

Correction Kernel (pseudolikelihood)
get_rank_distance

Compute the Distance between two rankings
metropolis_hastings_rho

Metropolis-Hastings Rho
heat_plot

Heat plot of posterior probabilities
label_switching

Checking for Label Switching in the Mallows Mixture Model
prepare_partition_function

Prepare partition functions
obs_freq

Observation frequencies in the Bayesian Mallows model
print.BayesMallows

Print Method for BayesMallows Objects
.generate_transitive_closure

Internal function for generating transitive closure
metropolis_hastings_alpha

Metropolis-Hastings Alpha
metropolis_hastings_aug_ranking

Metropolis-Hastings Augmented Ranking
potato_true_ranking

True ranking of the weights of 20 potatoes.
plot_elbow

Plot Within-Cluster Sum of Distances
predict_top_k

Predict Top-k Rankings with Pairwise Preferences
potato_weighing

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

SMC-Mallows new item rank
smc_mallows_new_users

SMC-Mallows New Users
sample_mallows

Random Samples from the Mallows Rank Model
sample_dataset

A synthetic 3D matrix generated using the sample_mallows function
potato_visual

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

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

Leap and Shift Probabilities
plot_top_k

Plot Top-k Rankings with Pairwise Preferences
rank_freq_distr

Frequency distribution of the ranking sequences
smc_processing

SMC Processing
log_expected_dist

Compute the logarithm of the expected distance of metrics for a Mallows rank model
get_sample_probabilities

Get Sample Probabilities
plot.SMCMallows

Plot SMC Posterior Distributions
plot.BayesMallows

Plot Posterior Distributions
run_mcmc

Worker function for computing the posterior distribution.
rmallows

Sample from the Mallows distribution.
sushi_rankings

Sushi Rankings
print.BayesMallowsMixtures

Print Method for BayesMallowsMixtures Objects
validate_permutation

Check if a vector is a permutation
rank_conversion

Convert between ranking and ordering.
compute_consensus.BayesMallows

Compute Consensus Ranking
compute_consensus

Compute Consensus Ranking
calculate_forward_probability

Calculate Forward Probability
beach_preferences

Beach Preferences
compute_consensus.consensus_SMCMallows

Compute Consensus Ranking