ocbe-uio / BayesMallows

R-package for Bayesian preference learning with the Mallows rank model.
https://ocbe-uio.github.io/BayesMallows/
GNU General Public License v3.0
21 stars 9 forks source link

Error in pseudo-likelihood proposal #421

Closed osorensen closed 2 months ago

osorensen commented 2 months ago

The code on lines 227-229 looks wrong. We should sample one index among many, but instead we sample many indexes and take the one which equals 1.

https://github.com/ocbe-uio/BayesMallows/blob/771fa30c97a9e109dedcd5adc6bb16b7d65cc48a/src/rank_proposal.cpp#L209-L243

osorensen commented 2 months ago

The code does exactly what it should, just in an obscure way.