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, ...)
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)
#> $alpha_acceptance
#> $alpha_acceptance[[1]]
#> [1] 0.7038889
#>
#>
#> $rho_acceptance
#> $rho_acceptance[[1]]
#> [1] 0.4716667
#>
#>
#> $aug_acceptance
#> $aug_acceptance[[1]]
#> [1] NaN
#>
#>