Documentation ¶
Index ¶
- type Optimizer
- type OptimizerOption
- type Sampler
- type SamplerOption
- func SamplerOptionBIPop(incPopSize int) SamplerOption
- func SamplerOptionIPop(incPopSize int) SamplerOption
- func SamplerOptionInitialMean(mean map[string]float64) SamplerOption
- func SamplerOptionInitialSigma(sigma float64) SamplerOption
- func SamplerOptionNStartupTrials(nStartupTrials int) SamplerOption
- func SamplerOptionOptimizerOptions(opts ...OptimizerOption) SamplerOption
- func SamplerOptionSeed(seed int64) SamplerOption
- type Solution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Optimizer ¶
type Optimizer struct {
// contains filtered or unexported fields
}
Optimizer is CMA-ES stochastic optimizer class with ask-and-tell interface.
func NewOptimizer ¶
func NewOptimizer(mean []float64, sigma float64, opts ...OptimizerOption) (*Optimizer, error)
NewOptimizer returns an optimizer object based on CMA-ES.
func (*Optimizer) Generation ¶
Generation is incremented when a multivariate normal distribution is updated.
func (*Optimizer) PopulationSize ¶
PopulationSize returns the population size.
func (*Optimizer) ShouldStop ¶
ShouldStop returns true when CMA-ES converged to local minimum or detecting divergent behavior.
type OptimizerOption ¶
type OptimizerOption func(*Optimizer)
OptimizerOption is a type of the function to customizing CMA-ES.
func OptimizerOptionBounds ¶
func OptimizerOptionBounds(bounds *mat.Dense) OptimizerOption
OptimizerOptionBounds sets the range of parameters.
func OptimizerOptionMaxReSampling ¶
func OptimizerOptionMaxReSampling(n int) OptimizerOption
OptimizerOptionMaxReSampling sets a number of max re-sampling.
func OptimizerOptionPopulationSize ¶
func OptimizerOptionPopulationSize(n int) OptimizerOption
OptimizerOptionPopulationSize sets population size.
func OptimizerOptionSeed ¶
func OptimizerOptionSeed(seed int64) OptimizerOption
OptimizerOptionSeed sets seed number.
type Sampler ¶
type Sampler struct {
// contains filtered or unexported fields
}
Sampler returns the next search points by using CMA-ES.
func NewSampler ¶
func NewSampler(opts ...SamplerOption) *Sampler
NewSampler returns the TPE sampler.
type SamplerOption ¶
type SamplerOption func(sampler *Sampler)
SamplerOption is a type of the function to customizing CMA-ES sampler.
func SamplerOptionBIPop ¶
func SamplerOptionBIPop(incPopSize int) SamplerOption
SamplerOptionBIPop enables restart CMA-ES with two interlaced restart strategies, one with an increasing population size and one with varying small population size. The argument is multiplier of population size before each restart and basically you should choose 2.
func SamplerOptionIPop ¶
func SamplerOptionIPop(incPopSize int) SamplerOption
SamplerOptionIPop enables restart CMA-ES with increasing population size. The argument is multiplier of population size before each restart and basically you should choose 2. From the experiments in the IPOP-CMA-ES, it reveal similar performance for factors between 2 and 3.
func SamplerOptionInitialMean ¶
func SamplerOptionInitialMean(mean map[string]float64) SamplerOption
SamplerOptionInitialMean sets the initial mean vectors.
func SamplerOptionInitialSigma ¶
func SamplerOptionInitialSigma(sigma float64) SamplerOption
SamplerOptionInitialSigma sets the initial sigma.
func SamplerOptionNStartupTrials ¶
func SamplerOptionNStartupTrials(nStartupTrials int) SamplerOption
SamplerOptionNStartupTrials sets the number of startup trials.
func SamplerOptionOptimizerOptions ¶
func SamplerOptionOptimizerOptions(opts ...OptimizerOption) SamplerOption
SamplerOptionOptimizerOptions sets the options for Optimizer.
func SamplerOptionSeed ¶
func SamplerOptionSeed(seed int64) SamplerOption
SamplerOptionSeed sets seed number.