sequince.steps.mutation.adaptive.proposal
=========================================

.. py:module:: sequince.steps.mutation.adaptive.proposal

.. autoapi-nested-parse::

   Adapt proposal parameters from completed mutation metrics.



Classes
-------

.. autoapisummary::

   sequince.steps.mutation.adaptive.proposal.AdaptiveGaussianProposal


Module Contents
---------------

.. py:class:: AdaptiveGaussianProposal(mutation)

   Bases: :py:obj:`sequince.steps.mutation.adaptive.base.AdaptiveMutationStep`


   Adapt proposal scale after a complete mutation block (eager execution).

   The wrapped step must return finalized ``MutationMetricsOutput`` in its
   output. Its output is preserved. The scale in ``context.metadata`` is
   initialized before mutation and updated afterward for the next call using
   ``scale * exp(adaptation_rate * (acceptance - target_acceptance))``.
   Proposal kernels must read ``scale_key`` from the context; this wrapper
   does not modify proposal objects. Wrap an entire ``RepeatedMutationStep``
   to keep the scale fixed across all its rounds. Place conditional execution
   outside this wrapper.

   Runtime scale lives in the context; checkpoint state forwards to the child.


   .. py:attribute:: mutation
      :type:  sequince.steps.base.SMCStep


   .. py:attribute:: scale_key
      :type:  str
      :value: 'proposal_scale'



   .. py:attribute:: initial_scale
      :type:  float
      :value: 1.0



   .. py:attribute:: target_acceptance
      :type:  float | None
      :value: 0.3



   .. py:attribute:: adaptation_rate
      :type:  float
      :value: 0.1



   .. py:attribute:: min_scale
      :type:  float
      :value: 0.001



   .. py:attribute:: max_scale
      :type:  float
      :value: 10.0



   .. py:method:: apply_with_n_steps(state, context, rng, *, n_steps)


