shrinkage_statistics

jaxns.internals.shrinkage_statistics

Module Contents

compute_enclosed_prior_volume(sample_tree)[source]

Compute the enclosed prior volume of the likelihood constraint.

Parameters:

sample_tree (jaxns.internals.tree_structure.SampleTreeGraph) – The sample tree graph.

Returns:

The log enclosed prior volume.

Return type:

jaxns.internals.types.MeasureType

class EvidenceUpdateVariables[source]

Bases: NamedTuple

num_live_points: jaxns.internals.types.FloatArray[source]
log_L_next: jaxns.internals.types.FloatArray[source]
update_evicence_calculation(evidence_calculation, update)[source]

Update the evidence statistics with a new sample.

Parameters:
Returns:

The updated evidence statistics.

Return type:

jaxns.internals.types.EvidenceCalculation

init_evidence_calc()[source]

Initialise the evidence statistics.

Returns:

The initial evidence statistics.

Return type:

jaxns.internals.types.EvidenceCalculation

compute_evidence_stats(log_L, num_live_points, num_samples=None)[source]

Compute the evidence statistics along the shrinkage process.

Parameters:
  • log_L (jaxns.internals.types.MeasureType) – The log likelihoods of the samples.

  • num_live_points (jaxns.internals.types.FloatArray) – The number of live points at each sample.

  • num_samples (Optional[jaxns.internals.types.IntArray]) – The number of samples to use. If None, all samples are used.

Returns:

The final evidence statistics, and the evidence statistics for each sample.

Return type:

Tuple[jaxns.internals.types.EvidenceCalculation, jaxns.internals.types.EvidenceCalculation]