Bayesian Preference Learning with the Mallows Rank Model
Overview
An implementation of the Bayesian version of the Mallows rank model (Vitelli et al., Journal of Machine Learning Research, 2018 https://jmlr.org/papers/v18/15-481.html; Crispino et al., Annals of Applied Statistics, 2019 doi:10.1214/18-AOAS1203; Sorensen et al., R Journal, 2020 doi:10.32614/RJ-2020-026; Stein, PhD Thesis, 2023 https://eprints.lancs.ac.uk/id/eprint/195759). 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 doi:10.1214/15-AOS1389).
- A bug in the computation of acceptance ratios has been fixed. Issue #436 on GitHub. Thanks to Jonas Nordstrøm for discovering.
- Documentation of return value added to get_acceptance_ratios().
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
Show 1 earlier changeHide 1 earlier change
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 47 (3 internal)includes a package overview page
- Examples that run
- 82%23 run in a plain check · 5 never run
- Exported functions with examples
- 79%
- Documented parameters
- 99%
- Return-value docs
- 85%
- Help pages citing references
- 51% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 8
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
12 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/ocbe-uio/bayesmallows on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-01-20 · The repository has a site deploy workflow
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2026-01-20Pull request: opened by its own accountCommits: 4 by its own account · at least 4 crediting it in the message
Dependencies
Installing BayesMallows adds 42 packages (20 with compiled code, 23 MB of source tarballs). Heaviest: ggplot2 6.0 MB, Rcpp 1.8 MB, isoband 1.5 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2.2.7Latest
- 2.2.62025-11-25 · diff ↗
- 2.2.52025-06-27 · diff ↗
- 2.2.42025-06-13 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 2.2.32025-01-14 · diff ↗
- 2.2.22024-08-17 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 2.2.12024-04-22 · diff ↗
- 2.2.0
- 2.1.12024-03-15 · diff ↗
- 2.1.02024-03-13 · diff ↗ ·
added 5 exports
burnin<-, burnin, compute_mallows_sequentially, get_acceptance_ratios, sample_prior - 2.0.12024-01-25 · diff ↗
- 2.0.02024-01-15 · diff ↗ ·
removed 14 exports
calculate_backward_probability, calculate_forward_probability, compute_posterior_intervals_alpha, compute_posterior_intervals_rho, compute_rho_consensus, expected_dist, generate_constraints, generate_initial_ranking, generate_transitive_closure, prepare_partition_function, rank_distance, rank_freq_distr, smc_mallows_new_item_rank, smc_mallows_new_usersadded 12 exports
compute_expected_distance, compute_observation_frequency, compute_rank_distance, get_cardinalities, get_transitive_closure, set_compute_options, set_initial_values, set_model_options, set_priors, set_smc_options, setup_rank_data, update_mallows - 1.5.02023-11-25 · diff ↗ ·
removed 7 exports
get_exponent_sum, get_sample_probabilities, leap_and_shift_probs, lik_db_mix, metropolis_hastings_alpha, metropolis_hastings_aug_ranking, metropolis_hastings_rho
Show 32 earlier eventsHide 32 earlier events
- 1.4.02023-10-04 · diff ↗ ·
removed 7 exports
metropolis_hastings_aug_ranking_pseudo, plot_alpha_posterior, plot_rho_posterior, smc_mallows_new_item_rank_alpha_fixed, smc_mallows_new_users_complete, smc_mallows_new_users_partial, smc_mallows_new_users_partial_alpha_fixedadded 1 export
prepare_partition_function - 1.3.22023-08-24 · diff ↗
- 1.3.12023-08-22 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.3.0
- 1.2.22023-02-03 · diff ↗
- 1.2.12022-11-04 · diff ↗
- 1.2.0
- RR 4.2.0 released · 2022-04-22
- 1.1.22022-04-11 · diff ↗
- 1.1.12022-04-02 · diff ↗
- 1.1.02021-12-03 · diff ↗ ·
added 19 exports
calculate_backward_probability, calculate_forward_probability, compute_posterior_intervals_alpha, compute_posterior_intervals_rho, compute_rho_consensus, get_mallows_loglik, get_sample_probabilities, leap_and_shift_probs, metropolis_hastings_alpha, metropolis_hastings_aug_ranking, metropolis_hastings_aug_ranking_pseudo, metropolis_hastings_rho, plot_alpha_posterior, plot_rho_posterior, smc_mallows_new_item_rank, smc_mallows_new_item_rank_alpha_fixed, smc_mallows_new_users_complete, smc_mallows_new_users_partial, smc_mallows_new_users_partial_alpha_fixed - 1.0.42021-11-17 · diff ↗
- 1.0.32021-10-14 · diff ↗
- 1.0.22021-06-04 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.0.12021-02-23 · diff ↗
- 1.0.0
- 0.5.02020-08-28 · diff ↗
- 0.4.42020-08-07 · diff ↗
- 0.4.32020-06-20 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.4.22020-03-23 · diff ↗
- 0.4.12019-09-05 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.4.02019-02-22 · diff ↗
- 0.3.12019-02-01 · diff ↗
- 0.3.0
- 0.2.0
- 0.1.12018-10-15 · diff ↗
- 0.1.02018-10-08
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-10-08
- Total releases
- 39 / 8 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 29 KB / 8 files
- Download size
- 4.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("BayesMallows")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.