File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ def run_example(
231
231
hm .logs .info_log (
232
232
"Realisation number = {}/{}" .format (i_realisation + 1 , n_realisations )
233
233
)
234
- sample = True
234
+ sample = False
235
235
if sample :
236
236
# =======================================================================
237
237
# Run Emcee to recover posterior samples
@@ -307,6 +307,8 @@ def run_example(
307
307
# Configure emcee chains for harmonic
308
308
# =======================================================================
309
309
estimate_evidence = True
310
+ thin = True
311
+ thin_by = 10 ** 4
310
312
if estimate_evidence :
311
313
for i in range (chain_iterations ):
312
314
@@ -325,6 +327,8 @@ def run_example(
325
327
"rb" ,
326
328
) as f :
327
329
samples = np .load (f )
330
+ if thin :
331
+ samples = samples [:, ::thin_by ]
328
332
with open (
329
333
"examples/plots/logprob_rosenbrock_"
330
334
+ str (ndim )
@@ -340,6 +344,8 @@ def run_example(
340
344
"rb" ,
341
345
) as f :
342
346
lnprob = np .load (f )
347
+ if thin :
348
+ lnprob = lnprob [::thin_by ]
343
349
344
350
chains = hm .Chains (ndim )
345
351
chains .add_chains_3d (samples , lnprob )
You can’t perform that action at this time.
0 commit comments