Learn R Programming

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

BayesMallows (version 1.0.2)

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 ). Both 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

697

Version

1.0.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Oystein Sorensen

Last Published

June 4th, 2021

Functions in BayesMallows (1.0.2)

compute_consensus

Compute Consensus Ranking
beach_preferences

Beach Preferences
get_partition_function

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

Preference Learning with the Mallows Rank Model
sample_mallows

Random Samples from the Mallows Rank Model
plot_elbow

Plot Within-Cluster Sum of Distances
potato_visual

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

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

Compute the Distance between two rankings
sushi_rankings

Sushi Rankings
assess_convergence

Trace Plots from Metropolis-Hastings Algorithm
generate_initial_ranking

Generate Initial Ranking
label_switching

Checking for Label Switching in the Mallows Mixture Model
generate_transitive_closure

Generate Transitive Closure
predict_top_k

Predict Top-k Rankings with Pairwise Preferences
asymptotic_partition_function

Asymptotic Approximation of Partition Function
obs_freq

Observation frequencies in the Bayesian Mallows model
lik_db_mix

Likelihood and log-likelihood evaluation for a Mallows mixture model
print.BayesMallows

Print Method for BayesMallows Objects
log_expected_dist

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

Check if a vector is a permutation
rank_distance

Distance between a set of rankings and a given rank sequence
.generate_transitive_closure

Internal function for generating transitive closure
estimate_partition_function

Estimate Partition Function
rmallows

Sample from the Mallows distribution.
run_mcmc

Worker function for computing the posterior distribution.
rank_freq_distr

Frequency distribution of the ranking sequences
expected_dist

Expected value of metrics under a Mallows rank model
generate_constraints

Generate Constraint Set from Pairwise Comparisons
rank_conversion

Convert between ranking and ordering.
plot_top_k

Plot Top-k Rankings with Pairwise Preferences
print.BayesMallowsMixtures

Print Method for BayesMallowsMixtures Objects
potato_true_ranking

True ranking of the weights of 20 potatoes.
compute_posterior_intervals

Compute Posterior Intervals
assign_cluster

Assign Assessors to Clusters
compute_mallows_mixtures

Compute Mixtures of Mallows Models
BayesMallows

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

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

Plot Posterior Distributions