From 6aefdb6f1f97105708805e49f310ae37a1db9c8a Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Mon, 28 Oct 2024 17:56:12 +0100 Subject: [PATCH] Use returned EvaluatedMeasure in paper example --- examples/paper-example/paper_example.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/paper-example/paper_example.jl b/examples/paper-example/paper_example.jl index 80342c45c..2b98ef250 100644 --- a/examples/paper-example/paper_example.jl +++ b/examples/paper-example/paper_example.jl @@ -135,23 +135,21 @@ prior_bkg = distbind(make_child_prior(length(summary_dataset_table)), parent_pr prior_bkg_signal = distbind(make_child_prior(length(summary_dataset_table)), parent_prior_bkg_signal, merge) -posterior_bkg = PosteriorMeasure(make_likelihood_bkg(summary_dataset_table, sample_table), prior_bkg) +posterior_bkg = lbqintegral(make_likelihood_bkg(summary_dataset_table, sample_table), prior_bkg) -posterior_bkg_signal = PosteriorMeasure(SignalBkgLikelihood(summary_dataset_table, sample_table), prior_bkg_signal) +posterior_bkg_signal = lbqintegral(SignalBkgLikelihood(summary_dataset_table, sample_table), prior_bkg_signal) nchains = 4 nsteps = 10^5 algorithm = TransformedMCMC(proposal = HamiltonianMC(), nchains = nchains, nsteps = nsteps) -samples_bkg = bat_sample(posterior_bkg, algorithm).result -eval_bkg = EvaluatedMeasure(posterior_bkg, samples = samples_bkg) +samples_bkg, eval_bkg = bat_sample(posterior_bkg, algorithm) @show evidence_bkg_bridge = bat_integrate(eval_bkg, BridgeSampling()).result @show evidence_bkg_cuba = bat_integrate(eval_bkg, VEGASIntegration(maxevals = 10^6, rtol = 0.005)).result -samples_bkg_signal = bat_sample(posterior_bkg_signal, algorithm).result -eval_bkg_signal = EvaluatedMeasure(posterior_bkg_signal, samples = samples_bkg_signal) +samples_bkg_signal, eval_bkg_signal = bat_sample(posterior_bkg_signal, algorithm) @show evidence_bkg_signal_bridge = bat_integrate(eval_bkg_signal, BridgeSampling()).result @show evidence_bkg_signal_cuba = bat_integrate(eval_bkg_signal, VEGASIntegration(maxevals = 10^6, rtol = 0.005)).result