Table of Contents

Class SBXCrossover

Namespace
OptunaSharp.Samplers.Nsgaii
Assembly
OptunaSharp.dll

Simulated Binary Crossover operation used by NSGAIISampler. Port of optuna/samplers/nsgaii/_crossovers/_sbx.py: SBXCrossover (experimental v3.0.0).

Generates a child from two parent individuals according to the polynomial probability distribution. Optuna returns only one child, so it uses uniform_crossover_prob and use_child_gene_prob to collapse the two SBX children into one.

public class SBXCrossover : BaseCrossover
Inheritance
SBXCrossover
Inherited Members

Constructors

SBXCrossover(double?, double, double)

Configures simulated-binary crossover spread and the policy for choosing each child coordinate.

public SBXCrossover(double? eta = null, double uniformCrossoverProb = 0.5, double useChildGeneProb = 0.5)

Parameters

eta double?

Distribution index. Defaults to 2 for single-objective, 20 for multi-objective.

uniformCrossoverProb double

Probability of uniform crossover between the two candidate children.

useChildGeneProb double

Per-variable probability of using the generated child value over the parent value.

Exceptions

ValueError

The distribution index is negative, uniform crossover probability is outside [0, 1], or child-gene probability is outside (0, 1].

Properties

NParents

Number of parent individuals required to perform crossover.

public override int NParents { get; }

Property Value

int

Methods

Crossover(double[][], NumPyRandom, Study, double[,])

Perform crossover of selected parent individuals.

public override double[] Crossover(double[][] parentsParams, NumPyRandom rng, Study study, double[,] searchSpaceBounds)

Parameters

parentsParams double[][]

A num_parents x num_parameters array. Represents a parameter space for each parent individual (continuous for numerical parameters). Row i is parent i.

rng NumPyRandom

An instance of numpy.random.RandomState.

study Study

Target study object.

searchSpaceBounds double[,]

A len_search_space x 2 array of numerical distribution bounds constructed from the transformed search space. Column 0 is lower, column 1 is upper.

Returns

double[]

A 1-dimensional array containing the new parameter combination.