Table of Contents

Class JanusAgeMoea2CmixSampler

Namespace
OptunaSharp.Samplers
Assembly
OptunaSharp.dll

AGE-MOEA-2 with JANUS-style CMIX candidate generation — the many-objective (5/8/10) sibling of JanusMooCmixSampler. AGE-MOEA-2 keeps full control of its adaptive-geometry survival; past a warm-up a small fraction of children are replaced by an inverse-curvature Gaussian sample (from component_losses or a diagonal-quadratic scalar fallback). See JanusMooCmixSampler for the CMIX parameters and the RNG divergence.

public sealed class JanusAgeMoea2CmixSampler : AgeMoea2Sampler
Inheritance
JanusAgeMoea2CmixSampler
Inherited Members

Constructors

JanusAgeMoea2CmixSampler(int, int?, double, string, double, double, double, int, int?, string, string, BaseMutation?, double?, BaseCrossover?, double, double)

Configures curvature-informed candidate injection into an AGE-MOEA-2 population.

public JanusAgeMoea2CmixSampler(int populationSize = 50, int? seed = null, double cmixProb = 0.02, string cmixWindow = "auto", double cmixRidge = 1, double cmixLambda = 1, double cmixSigma = 0.002, int cmixStartGeneration = 3, int? cmixStartTrial = 100, string componentAttr = "component_losses", string scalarFallback = "diag_quadratic", BaseMutation? mutation = null, double? mutationProb = null, BaseCrossover? crossover = null, double crossoverProb = 0.9, double swappingProb = 0.5)

Parameters

populationSize int

AGE-MOEA-2 population size (default 50).

seed int?

Random seed (seeds both AGE-MOEA-2 and, separately, the CMIX stream).

cmixProb double

Probability a child is replaced by a CMIX sample past the warm-up (default 0.02).

cmixWindow string

Recent-window size for the metric fit: "auto" (= 3·populationSize) or an integer string.

cmixRidge double

Ridge regularization for the metric regression (default 1.0).

cmixLambda double

Levenberg–Marquardt damping added before inverting the metric (default 1.0).

cmixSigma double

Normalized step size scaling the inverse-curvature covariance (default 0.002).

cmixStartGeneration int

Warm-up in generations, used only when cmixStartTrial is null (default 3).

cmixStartTrial int?

Warm-up in trials before CMIX may fire; null derives it from cmixStartGeneration (default 100).

componentAttr string

User-attribute key the CMIX metric reads each trial's residual vector from. The default is component_losses, the key trial.SetComponentLosses writes.

A custom key is read exactly as given, so store the vector with trial.SetUserAttr(componentAttr, …). Only the default key also accepts the legacy rae alias.

CMIX fits the component metric only when every trial in its window carries a numeric vector under this key; otherwise it uses scalarFallback. null turns the component channel off.

scalarFallback string

Scalar metric when no components are present: diag_quadratic (default) or none.

mutation BaseMutation

AGE-MOEA-2 mutation (forwarded).

mutationProb double?

AGE-MOEA-2 mutation probability (forwarded).

crossover BaseCrossover

AGE-MOEA-2 crossover (forwarded).

crossoverProb double

AGE-MOEA-2 crossover probability (forwarded, default 0.9).

swappingProb double

AGE-MOEA-2 swapping probability (forwarded, default 0.5).

Methods

SampleRelative(Study, FrozenTrial, OrderedDict<string, BaseDistribution>)

Sample parameters in a given search space.

The trial invokes this method lazily when it first needs relative parameters and caches the result for its remaining suggestions. This method is suitable for sampling algorithms that use relationship between parameters such as Gaussian Process and CMA-ES.

public override OrderedDict<string, object?> SampleRelative(Study study, FrozenTrial trial, OrderedDict<string, BaseDistribution> searchSpace)

Parameters

study Study

Study supplying trial history, directions, and storage.

trial FrozenTrial

Current trial snapshot; copy it before modifying its contents.

searchSpace OrderedDict<string, BaseDistribution>

Distributions returned by InferRelativeSearchSpace(Study, FrozenTrial).

Returns

OrderedDict<string, object>

Jointly sampled external parameter values; omitted parameters use independent sampling.