sequince.steps.mutation.adaptive.policies.acceptance#
Choose mutation budgets from observed acceptance probabilities.
Classes#
Target an expected number of accepted moves per particle. |
Module Contents#
- class sequince.steps.mutation.adaptive.policies.acceptance.AcceptanceRatePolicy(target_steps, *, min_steps, max_steps, min_acceptance=1e-06)[source]#
Target an expected number of accepted moves per particle.
Propose
ceil(target_steps / max(acceptance, min_acceptance))for the next iteration.min_acceptance(default1e-6) keeps the budget finite for zero or very small acceptance rates. Every returned budget is clipped to the requiredmin_stepsandmax_stepsbounds. A block with no attempted moves supplies no acceptance estimate, so its current budget is retained (or increased to one when zero) to allow a subsequent measurement.Acceptance is estimated from the complete block’s accepted and attempted counts, including fractional expected counts from recycling algorithms.
- min_steps#
- max_steps#
- target_steps#
- min_acceptance#
- initialise(*, initial_steps, context)[source]#
- Parameters:
initial_steps (int)
context (sequince.steps.context.StepContext)
- Return type:
- update(*, current_steps, metrics, context)[source]#
- Parameters:
current_steps (int)
metrics (sequince.steps.mutation.metrics.MutationMetricsOutput)
context (sequince.steps.context.StepContext)
- Return type: