Skip to content

Commit 8e15fc6

Browse files
Switch evidence to log.
1 parent 46a01dd commit 8e15fc6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/gaussian_nondiagcov.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def run_example(
122122

123123
# Run multiple realisations.
124124
n_realisations = 1
125-
evidence_inv_summary = np.zeros((n_realisations, 3))
125+
ln_evidence_inv_summary = np.zeros((n_realisations, 3))
126126
for i_realisation in range(n_realisations):
127127
if n_realisations > 0:
128128
hm.logs.info_log(
@@ -292,28 +292,28 @@ def run_example(
292292
plt.show()
293293

294294
# Save out realisations for violin plot.
295-
evidence_inv_summary[i_realisation, 0] = ev.evidence_inv
296-
evidence_inv_summary[i_realisation, 1] = ev.evidence_inv_var
297-
evidence_inv_summary[i_realisation, 2] = ev.evidence_inv_var_var
295+
ln_evidence_inv_summary[i_realisation, 0] = ev.ln_evidence_inv
296+
ln_evidence_inv_summary[i_realisation, 1] = ev.ln_evidence_inv_var
297+
ln_evidence_inv_summary[i_realisation, 2] = ev.ln_evidence_inv_var_var
298298

299299
clock = time.process_time() - clock
300300
hm.logs.info_log("Execution_time = {}s".format(clock))
301301

302302
if n_realisations > 1:
303303
save_name = (
304304
save_name_start
305-
+ "_gaussian_nondiagcov_evidence_inv"
305+
+ "_gaussian_nondiagcov_ln_evidence_inv"
306306
+ "_realisations_{}D.dat".format(ndim)
307307
)
308-
np.savetxt(save_name, evidence_inv_summary)
309-
evidence_inv_analytic_summary = np.zeros(1)
310-
evidence_inv_analytic_summary[0] = np.exp(-ln_evidence_analytic)
308+
np.savetxt(save_name, ln_evidence_inv_summary)
309+
ln_evidence_inv_analytic_summary = np.zeros(1)
310+
ln_evidence_inv_analytic_summary[0] = -ln_evidence_analytic
311311
save_name = (
312312
save_name_start
313-
+ "_gaussian_nondiagcov_evidence_inv"
313+
+ "_gaussian_nondiagcov_ln_evidence_inv"
314314
+ "_analytic_{}D.dat".format(ndim)
315315
)
316-
np.savetxt(save_name, evidence_inv_analytic_summary)
316+
np.savetxt(save_name, ln_evidence_inv_analytic_summary)
317317

318318
created_plots = True
319319
if created_plots:

0 commit comments

Comments
 (0)