This makes the assumption that the proposal has saved a variable "proposal_used" and mcmc has saved a variable 'accept'.
Examples
data <- bnlearn::learning.test
scorer <- CreateScorer(
scorer = BNLearnScorer,
data = data
)
init_state <- InitPartition(colnames(data), scorer)
#> Loading required namespace: igraph
results <- SampleChains(10, init_state, PartitionMCMC(), scorer)
CalculateAcceptanceRates(results)
#> # A tibble: 1 × 5
#> mean_accept mean_black_obeyed mean_white_obeyed n_accept n_total
#> <dbl> <dbl> <dbl> <int> <int>
#> 1 0.3 1 1 6 20