get_acceptance_ratios {BayesMallows}R Documentation

Get Acceptance Ratios

Description

Extract acceptance ratio from Metropolis-Hastings algorithm used by compute_mallows() or by the move step in update_mallows() and compute_mallows_sequentially(). Currently the function only returns the values, but it will be refined in the future. If burnin is not set in the call to compute_mallows(), the acceptance ratio for all iterations will be reported. Otherwise the post burnin acceptance ratio is reported. For the SMC method the acceptance ratios apply to all iterations, since no burnin is needed in here.

Usage

get_acceptance_ratios(model_fit, ...)

## S3 method for class 'BayesMallows'
get_acceptance_ratios(model_fit, ...)

## S3 method for class 'SMCMallows'
get_acceptance_ratios(model_fit, ...)

Arguments

model_fit

A model fit.

...

Other arguments passed on to other methods. Currently not used.

See Also

Other posterior quantities: assign_cluster(), compute_consensus(), compute_posterior_intervals(), heat_plot(), plot.BayesMallows(), plot.SMCMallows(), plot_elbow(), plot_top_k(), predict_top_k(), print.BayesMallows()

Examples

set.seed(1)
mod <- compute_mallows(
  data = setup_rank_data(potato_visual),
  compute_options = set_compute_options(burnin = 200)
)

get_acceptance_ratios(mod)

[Package BayesMallows version 2.2.1 Index]