optuna.samplers.nsgaii.SPXCrossover
- class optuna.samplers.nsgaii.SPXCrossover(epsilon=None)[source]
Simplex Crossover operation used by
NSGAIISampler.Uniformly samples child individuals from within a single simplex that is similar to the simplex produced by the parent individual. For further information about SPX crossover, please refer to the following paper:
- Parameters
epsilon (Optional[float]) – Expansion rate. If not specified, defaults to
sqrt(len(search_space) + 2).
Note
Added in v3.0.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v3.0.0.
Methods
crossover(parents_params, rng, study, ...)Perform crossover of selected parent individuals.
Attributes
n_parents- crossover(parents_params, rng, study, search_space_bounds)[source]
Perform crossover of selected parent individuals.
This method is called in
sample_relative().- Parameters
parents_params (ndarray) – A
numpy.ndarraywith dimensionsnum_parents x num_parameters. Represents a parameter space for each parent individual. This space is continuous for numerical parameters.rng (RandomState) – An instance of
numpy.random.RandomState.study (Study) – Target study object.
search_space_bounds (ndarray) – A
numpy.ndarraywith dimensionslen_search_space x 2representing numerical distribution bounds constructed from transformed search space.
- Returns
A 1-dimensional
numpy.ndarraycontaining new parameter combination.- Return type
ndarray