sequince.steps.mutation.adaptive.policies.rjd
=============================================

.. py:module:: sequince.steps.mutation.adaptive.policies.rjd

.. autoapi-nested-parse::

   Choose the next mutation budget from completed relative jump distances.



Classes
-------

.. autoapisummary::

   sequince.steps.mutation.adaptive.policies.rjd.RelativeJumpDistancePolicy


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

.. py:class:: RelativeJumpDistancePolicy

   Increase or decrease a fixed budget using the fraction of RJD > 1.

   :param target_fraction: Lower threshold for the fraction exceeding the radius, default 0.5.
   :type target_fraction: float
   :param factor: Multiplicative budget adjustment, greater than one, default 1.1.
                  Below the lower threshold, multiply and round up; above the upper
                  threshold, divide and round down. AdaptMutationSteps supplies bounds.
   :type factor: float
   :param metric_name: Key containing RelativeJumpDistanceMetric results, default "rjd".
   :type metric_name: str
   :param upper_target_fraction: Decrease only above this fraction. None uses target_fraction.
                                 The inclusive interval between thresholds retains the budget.
   :type upper_target_fraction: float or None

   .. rubric:: Notes

   This population-level controller follows the increase/decrease idea in
   Buchner (2024), https://arxiv.org/abs/2402.11936. The factor and aggregation
   are implementation choices, not a convergence guarantee from that paper.
   Decisions affect the next SMC iteration, never stop the current block.
   No measured transitions retains the budget (at least one).


   .. py:attribute:: target_fraction
      :type:  float
      :value: 0.5



   .. py:attribute:: factor
      :type:  float
      :value: 1.1



   .. py:attribute:: metric_name
      :type:  str
      :value: 'rjd'



   .. py:attribute:: upper_target_fraction
      :type:  float | None
      :value: None



   .. py:method:: initialise(*, initial_steps, context)

      Retain the supplied initial budget.



   .. py:method:: update(*, current_steps, metrics, context)

      Propose an integer budget from completed population diagnostics.



