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
populationSizeintAGE-MOEA-2 population size (default 50).
seedint?Random seed (seeds both AGE-MOEA-2 and, separately, the CMIX stream).
cmixProbdoubleProbability a child is replaced by a CMIX sample past the warm-up (default 0.02).
cmixWindowstringRecent-window size for the metric fit:
"auto"(= 3·populationSize) or an integer string.cmixRidgedoubleRidge regularization for the metric regression (default 1.0).
cmixLambdadoubleLevenberg–Marquardt damping added before inverting the metric (default 1.0).
cmixSigmadoubleNormalized step size scaling the inverse-curvature covariance (default 0.002).
cmixStartGenerationintWarm-up in generations, used only when
cmixStartTrialisnull(default 3).cmixStartTrialint?Warm-up in trials before CMIX may fire;
nullderives it fromcmixStartGeneration(default 100).componentAttrstringUser-attribute key the CMIX metric reads each trial's residual vector from. The default is
component_losses, the keytrial.SetComponentLosseswrites.A custom key is read exactly as given, so store the vector with
trial.SetUserAttr(componentAttr, …). Only the default key also accepts the legacyraealias.CMIX fits the component metric only when every trial in its window carries a numeric vector under this key; otherwise it uses
scalarFallback.nullturns the component channel off.scalarFallbackstringScalar metric when no components are present:
diag_quadratic(default) ornone.mutationBaseMutationAGE-MOEA-2 mutation (forwarded).
mutationProbdouble?AGE-MOEA-2 mutation probability (forwarded).
crossoverBaseCrossoverAGE-MOEA-2 crossover (forwarded).
crossoverProbdoubleAGE-MOEA-2 crossover probability (forwarded, default 0.9).
swappingProbdoubleAGE-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
studyStudyStudy supplying trial history, directions, and storage.
trialFrozenTrialCurrent trial snapshot; copy it before modifying its contents.
searchSpaceOrderedDict<string, BaseDistribution>Distributions returned by InferRelativeSearchSpace(Study, FrozenTrial).
Returns
- OrderedDict<string, object>
Jointly sampled external parameter values; omitted parameters use independent sampling.