blackjax.ns.integrator#

Evidence integration for Nested Sampling.

This module provides utilities for tracking the evidence integral during a Nested Sampling run. The NSIntegrator accumulates statistics as the algorithm compresses the prior volume, computing the marginal likelihood (evidence), the running prior-volume estimate, and the live-point evidence contribution.

Classes#

NSIntegrator

Integrator for computing the evidence integral in Nested Sampling.

Functions#

init_integrator(→ NSIntegrator)

Initialize the evidence integrator from the initial live points.

update_integrator(→ NSIntegrator)

Update the evidence integrator after a Nested Sampling step.

Module Contents#

class NSIntegrator[source]#

Integrator for computing the evidence integral in Nested Sampling.

This accumulates statistics over the course of a Nested Sampling run, computing the evidence (marginal likelihood) and related quantities from the history of dead particles. These are derived quantities that can be reconstructed from the dead particle history.

logX[source]#

The log of the current prior volume estimate.

logZ[source]#

The accumulated log evidence estimate from the “dead” points.

logZ_live[source]#

The current estimate of the log evidence contribution from the live points.

logX: blackjax.types.Array[source]#
logZ: blackjax.types.Array[source]#
logZ_live: blackjax.types.Array[source]#
init_integrator(particle_state: blackjax.ns.base.StateWithLogLikelihood) NSIntegrator[source]#

Initialize the evidence integrator from the initial live points.

Parameters:

particle_state – The initial state containing the live particles.

Returns:

The initial integrator with logX=0, logZ=-inf, and logZ_live computed from the initial live points.

Return type:

NSIntegrator

update_integrator(integrator: NSIntegrator, particle_state: blackjax.ns.base.StateWithLogLikelihood, dead_particles: blackjax.ns.base.StateWithLogLikelihood) NSIntegrator[source]#

Update the evidence integrator after a Nested Sampling step.

Parameters:
  • integrator – The current integrator state.

  • particle_state – The updated live state after the NS step.

  • dead_particles – The particles that died in this step.

Returns:

The updated integrator. logX is the prior volume after all num_deleted deletions, logZ is the accumulated log evidence, and logZ_live is the log evidence contribution from the remaining live points.

Return type:

NSIntegrator