sequince.steps.mutation.metrics.state#

Immutable runtime state and completed mutation metrics.

Classes#

MutationMetricsOutput

Core bookkeeping and named results for one complete mutation block.

MutationStepState

Immutable pytree state for continuing a mutation block.

MutationTransition

One transition's accepted displacement and read-only kernel auxiliary.

Module Contents#

class sequince.steps.mutation.metrics.state.MutationMetricsOutput[source]#

Core bookkeeping and named results for one complete mutation block.

n_accepted counts accepted proposals for sampled transitions. Recycling algorithms integrating over accept/reject decisions report the expected count instead, which may be fractional.

n_steps: Any#
n_attempted: Any#
n_accepted: Any#
values: collections.abc.Mapping[str, Any]#
property acceptance: Any#
Return type:

Any

class sequince.steps.mutation.metrics.state.MutationStepState[source]#

Immutable pytree state for continuing a mutation block.

Normally obtained from apply_with_mutation_state by passing None for the initial state, then passed unchanged into the next call. states holds individual metric states in configured metric order; the counters accumulate across the complete block. This is runtime state, not finalized metrics. Its pytree structure, leaf shapes and dtypes must remain fixed inside compiled loops.

states: tuple[Any, ...]#
n_steps: Any#
n_attempted: Any#
n_accepted: Any#
class sequince.steps.mutation.metrics.state.MutationTransition[source]#

One transition’s accepted displacement and read-only kernel auxiliary.

This ephemeral input is never retained by the metric collection.

Parameters:
  • displacement (array) – Accepted displacement in mutation coordinates with shape (n_particles, n_dimensions), zero for rejected rows.

  • kernel_auxiliary (pytree, optional) – Read-only auxiliary information from the kernel sample, or None. Red-blue sweeps restore particle-aligned leaves to population order.

displacement: sequince.typing.Array#
kernel_auxiliary: Any = None#