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

Heatplots #255

Closed osorensen closed 1 year ago

osorensen commented 1 year ago

Good suggestion from Marta: add a function to create heat plots as in Figure 5 of the JMLR paper.

osorensen commented 1 year ago

I've now implemented a heat_plot() function which does this. It uses the consensus ranking to order the items along the x-axis.

library(BayesMallows)
model_fit <- compute_mallows(potato_visual, nmc = 10000, seed = 1)
model_fit$burnin <- 1000

heat_plot(model_fit)


# Items are ordered along the horizontal axis according to the ordering
# returned by compute_consensus, whose default argument is type="CP".

heat_plot(model_fit, type = "MAP")

Created on 2023-03-10 with reprex v2.0.2

osorensen commented 1 year ago

Closed by #288