Run benchmarks across multiple configurations to compare performance.
Examples
# \donttest{
# Compare benchmarks (slow, not run on CRAN)
configs <- list(
list(N = 50, p = 2, n_groups = 0),
list(N = 100, p = 2, n_groups = 0)
)
comparison <- ratiod_benchmark_compare(configs, n_iter = 200, n_warmup = 100)
#> Inference: Exact (Tier 1)
#> Backend: hmc
#> Reason: default (full MCMC)
#> Fitting ratio model...
#> Family: negbin_negbin
#> Observations: 50
#> Iterations: 200 (warmup: 100)
#> Running NUTS sampler...
#> Parameters: 6
#> Iterations: 200 (warmup: 100)
#> Chains: 1 (cores: 1)
#> Inference: Exact (Tier 1)
#> Backend: hmc
#> Reason: default (full MCMC)
#> Fitting ratio model...
#> Family: negbin_negbin
#> Observations: 100
#> Iterations: 200 (warmup: 100)
#> Running NUTS sampler...
#> Parameters: 6
#> Iterations: 200 (warmup: 100)
#> Chains: 1 (cores: 1)
print(comparison)
#> N p n_groups n_params elapsed_sec samples_per_sec iter_per_sec n_divergent
#> 1 50 2 0 6 0.01600027 6249.894 12499.79 0
#> 2 100 2 0 6 0.01913905 5224.919 10449.84 0
# }