optuna.samplers.nsgaii.BaseMutation
- class optuna.samplers.nsgaii.BaseMutation(*args, **kwargs)[source]
Base class for mutations.
A mutation operation is used by
NSGAIISamplerto mutate a numerical parameter when creating a new individual.Note
Added in v5.0.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v5.0.0.
Methods
mutation(param, rng, study, search_space_bounds)Mutate the given parameter.
- abstractmethod mutation(param, rng, study, search_space_bounds)[source]
Mutate the given parameter.
- Parameters:
param (float) – A parameter value in the transformed numerical search space.
rng (np.random.RandomState) – An instance of
numpy.random.RandomState.study (Study) – Target study object.
search_space_bounds (np.ndarray) – A
numpy.ndarraywith shape(2,)representing the numerical distribution bounds constructed from transformed search space.
- Returns:
A mutated parameter value in the transformed numerical search space.
- Return type: