Class NSGAIIElitePopulationSelectionStrategy
- Namespace
- OptunaSharp.Samplers.Nsgaii
- Assembly
- OptunaSharp.dll
The default elite-population selection strategy of NSGAIISampler. Port of
optuna/samplers/nsgaii/_elite_population_selection_strategy.py.
Ranks the combined population by (constrained) non-domination, then fills the elite
population rank by rank; the rank that overflows population_size is truncated by
crowding distance (descending). The resulting order is load-bearing — it seeds the parent
population that later generations index into with rng.choice.
public class NSGAIIElitePopulationSelectionStrategy
- Inheritance
-
NSGAIIElitePopulationSelectionStrategy
- Inherited Members
Constructors
NSGAIIElitePopulationSelectionStrategy(int, Func<FrozenTrial, IEnumerable<double>>?)
Configures nondomination ranking and crowding-distance truncation to a fixed population size.
public NSGAIIElitePopulationSelectionStrategy(int populationSize, Func<FrozenTrial, IEnumerable<double>>? constraintsFunc = null)
Parameters
populationSizeintNumber of individuals retained or evaluated per generation.
constraintsFuncFunc<FrozenTrial, IEnumerable<double>>Optional legacy callback returning constraint values; positive values violate a constraint.
Exceptions
- ValueError
Population size is below two.
Methods
Select(Study, List<FrozenTrial>)
Select the elite population from the given trials (Python call).
public List<FrozenTrial> Select(Study study, List<FrozenTrial> population)
Parameters
studyStudyStudy supplying trial history, objective directions, and storage.
populationList<FrozenTrial>Individuals available for survival or reproduction.
Returns
- List<FrozenTrial>
The individuals retained by the configured survival rule, in selection order.