sequince.steps.mutation.factory

sequince.steps.mutation.factory#

Functions#

get_mutation_step(mutation, target[, transform, ...])

Construct a configured mutation step.

Module Contents#

sequince.steps.mutation.factory.get_mutation_step(mutation, target, transform=None, mutation_n_steps=10, mutation_kwargs=None, adaptive_mutation=None)[source]#

Construct a configured mutation step.

Parameters:
  • mutation (str, SMCStep or None) – Named mutation, custom step, or disabled mutation.

  • target (Target or callable) – Target passed to the mutation constructor.

  • transform (ParticleTransform or None, optional) – Transform passed to the mutation constructor.

  • mutation_n_steps (int, optional) – Fixed total budget, or initial budget when adaptation is enabled.

  • mutation_kwargs (dict or None, optional) – Additional mutation constructor options.

  • adaptive_mutation (Mapping[str, object] or None, optional) – Named miniPCN and differential-evolution mutations support enabled (default True), min_steps (0), max_steps (1000), and target_accepted_moves (5.0). Omission disables adaptation. Completed acceptance metrics select the next iteration’s bounded budget; the current block is frozen before execution. Accepted moves need not be independent samples. Proposal parameters are unchanged.

Returns:

Configured mutation, optionally wrapped in AdaptMutationSteps.

Return type:

SMCStep or None