jaxrens.postprocess.thermodynamics¶
Thermodynamic post-processing of nested sampling results.
NumPy-based for unconditional float64 precision. Sampling is pinned to
float32 by the root __init__ (see the comment there); post-processing
runs in a separate process, so the precision regimes don’t interfere.
Energy convention: E = -log(L), so higher energy = lower likelihood.
Batch-shape support¶
All public functions accept dead_energies with arbitrary leading batch
dimensions (*batch, max_dead). Output shape mirrors the input batch
prefix (output of the trailing axis-reduction). Examples:
(max_dead,)→ scalar output(n_runs, max_dead)→(n_runs,)(G, P, max_dead)→(G, P)
JAX-array inputs are auto-converted to NumPy via np.asarray; outputs are
always NumPy float64 (or 0-d / array thereof). JIT-compilation of these
functions is not supported; they run on the host in fp64. Cv etc.
on a (n_dead,) array of a few thousand entries is far below the cost of
a typical sampling iteration, so JITability bought nothing in practice
while masking precision loss.
Functions
Compute log prior-mass weights for dead points. |
|
Compute log weight for each remaining live walker. |
|
Thermal expectation |
|
Helmholtz free energy |
|
Heat capacity |
|
Total log evidence |
|
Log partition function |