pub struct CmaEsSampler { /* private fields */ }Expand description
A Sampler driven by CMA-ES over the study’s numeric parameters.
Construct with CmaEsSampler::new (OS-seeded) or
CmaEsSampler::seeded (reproducible). The population size λ defaults to
the CMA-ES rule 4 + ⌊3·ln n⌋ and can be overridden with
CmaEsSampler::population_size; the first generation is sampled at random
as warmup (see CmaEsSampler::n_startup_trials).
Implementations§
Source§impl CmaEsSampler
impl CmaEsSampler
Sourcepub fn new() -> CmaEsSampler
pub fn new() -> CmaEsSampler
A CMA-ES sampler seeded from OS entropy (non-deterministic across runs).
Sourcepub fn seeded(seed: u64) -> CmaEsSampler
pub fn seeded(seed: u64) -> CmaEsSampler
A CMA-ES sampler with a fixed seed — reproducible for tests/benchmarks.
Sourcepub fn population_size(self, lambda: usize) -> CmaEsSampler
pub fn population_size(self, lambda: usize) -> CmaEsSampler
Override the population size λ (default 4 + ⌊3·ln n⌋).
Sourcepub fn n_startup_trials(self, n: usize) -> CmaEsSampler
pub fn n_startup_trials(self, n: usize) -> CmaEsSampler
Number of initial trials drawn at random before CMA-ES takes over (default: one population, λ). A full generation of spread-out points makes the first covariance estimate meaningful.
Sourcepub fn sigma0(self, sigma0: f64) -> CmaEsSampler
pub fn sigma0(self, sigma0: f64) -> CmaEsSampler
Initial step size σ₀, as a fraction of the normalized [0, 1] range
(default 0.2).
Sourcepub fn bound_handling(self, handling: BoundHandling) -> CmaEsSampler
pub fn bound_handling(self, handling: BoundHandling) -> CmaEsSampler
How to repair out-of-box draws (default BoundHandling::Reflect).