abc ============= .. py:module:: jaxns.samplers.abc .. rubric:: :code:`jaxns.samplers.abc` .. rubric:: Module Contents .. py:data:: SamplerState .. py:class:: EphemeralState Bases: :py:obj:`NamedTuple` .. py:attribute:: key :type: jaxns.internals.types.PRNGKey .. py:attribute:: live_points_collection :type: jaxns.nested_samplers.common.types.LivePointCollection .. py:attribute:: termination_register :type: jaxns.nested_samplers.common.types.TerminationRegister .. py:class:: AbstractSampler Bases: :py:obj:`abc.ABC`, :py:obj:`Generic`\ [\ :py:obj:`SamplerState`\ ] Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: pre_process(ephemeral_state) Run this periodically on the state to produce a data pytree that can be used by the sampler, and updated quickly. :param ephemeral_state: the current state of the sampler :returns: any valid pytree .. py:method:: post_process(ephemeral_state, sampler_state) Post process the sampler state, after the sampler has been run. Should be quick. :param ephemeral_state: a sample collection post sample step :param sampler_state: data pytree produced by the sampler :returns: the updated sampler state .. py:method:: get_sample(key, log_L_constraint, sampler_state) Produce a single i.i.d. sample from the model within the log_L_constraint. :param key: PRNGkey :param log_L_constraint: the constraint to sample within :param sampler_state: the data pytree needed and produced by the sampler :returns: an i.i.d. sample, and phantom samples .. py:method:: num_phantom() :abstractmethod: The number of phantom samples produced by the sampler. :returns: number of phantom samples