@@ -205,7 +205,7 @@ def run_example(
205
205
"""
206
206
Set up and run multiple simulations
207
207
"""
208
- n_realisations = 2
208
+ n_realisations = 1
209
209
ln_evidence_inv_summary = np .zeros ((n_realisations , 5 ))
210
210
for i_realisation in range (n_realisations ):
211
211
if n_realisations > 1 :
@@ -300,15 +300,22 @@ def run_example(
300
300
# ======================================================================
301
301
# Display evidence computation results.
302
302
# ======================================================================
303
- hm .logs .debug_log (
303
+ hm .logs .info_log (
304
304
"Evidence: numerical = {}, estimate = {}" .format (
305
305
evidence_numerical_integration , np .exp (ln_evidence )
306
306
)
307
307
)
308
308
309
+ hm .logs .info_log (
310
+ "Ln evidence numerical = {}" .format (
311
+ np .log (evidence_numerical_integration )
312
+ )
313
+ )
314
+
309
315
hm .logs .debug_log (
310
316
"Inv Evidence: numerical = {}, estimate = {}" .format (
311
- 1.0 / evidence_numerical_integration , ev .evidence_inv
317
+ 1.0 / evidence_numerical_integration ,
318
+ np .exp (ev .ln_evidence_inv ),
312
319
)
313
320
)
314
321
diff = np .log (np .abs (evidence_numerical_integration - np .exp (ln_evidence )))
@@ -320,8 +327,11 @@ def run_example(
320
327
321
328
hm .logs .info_log (
322
329
"Inv Evidence: |numerical - estimate| / estimate = {}" .format (
323
- np .abs (1.0 / evidence_numerical_integration - ev .evidence_inv )
324
- / ev .evidence_inv
330
+ np .abs (
331
+ 1.0 / evidence_numerical_integration
332
+ - np .exp (ev .ln_evidence_inv )
333
+ )
334
+ / np .exp (ev .ln_evidence_inv )
325
335
)
326
336
)
327
337
@@ -472,10 +482,10 @@ def run_example(
472
482
lg .setup_logging ()
473
483
474
484
# Define parameters.
475
- ndim = 10
476
- nchains = 1000
477
- samples_per_chain = 10e6
478
- nburn = 10000
485
+ ndim = 2
486
+ nchains = 100
487
+ samples_per_chain = 5000
488
+ nburn = 1000
479
489
480
490
# flow_str = "RealNVP"
481
491
flow_str = "RQSpline"
0 commit comments