Documentation
¶
Index ¶
- func DefaultGamma(x int) int
- func DefaultWeights(x int) []float64
- func HyperoptDefaultGamma(x int) int
- type FuncGamma
- type FuncWeights
- type ParzenEstimator
- type ParzenEstimatorParams
- type Sampler
- type SamplerOption
- func SamplerOptionGammaFunc(gamma FuncGamma) SamplerOption
- func SamplerOptionNumberOfEICandidates(n int) SamplerOption
- func SamplerOptionNumberOfStartupTrials(n int) SamplerOption
- func SamplerOptionParzenEstimatorParams(params ParzenEstimatorParams) SamplerOption
- func SamplerOptionSeed(seed int64) SamplerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultWeights ¶
DefaultWeights is a default weights function.
func HyperoptDefaultGamma ¶
HyperoptDefaultGamma is a default gamma function of Hyperopt.
Types ¶
type ParzenEstimator ¶
ParzenEstimator is a surrogate model for TPE>
func NewParzenEstimator ¶
func NewParzenEstimator(mus []float64, low, high float64, params ParzenEstimatorParams) *ParzenEstimator
NewParzenEstimator returns the parzen estimator object.
type ParzenEstimatorParams ¶
type ParzenEstimatorParams struct {
ConsiderPrior bool
ConsiderMagicClip bool
ConsiderEndpoints bool
Weights FuncWeights
PriorWeight float64 // optional
}
ParzenEstimatorParams holds the parameters of ParzenEstimator
type Sampler ¶
type Sampler struct {
// contains filtered or unexported fields
}
Sampler returns the next search points by using TPE.
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 TPE sampler.
func SamplerOptionGammaFunc ¶
func SamplerOptionGammaFunc(gamma FuncGamma) SamplerOption
SamplerOptionGammaFunc sets the gamma function.
func SamplerOptionNumberOfEICandidates ¶
func SamplerOptionNumberOfEICandidates(n int) SamplerOption
SamplerOptionNumberOfEICandidates sets the number of EI candidates (default 24).
func SamplerOptionNumberOfStartupTrials ¶
func SamplerOptionNumberOfStartupTrials(n int) SamplerOption
SamplerOptionNumberOfStartupTrials sets the number of start up trials (default 10).
func SamplerOptionParzenEstimatorParams ¶
func SamplerOptionParzenEstimatorParams(params ParzenEstimatorParams) SamplerOption
SamplerOptionParzenEstimatorParams sets the parameter of ParzenEstimator.
func SamplerOptionSeed ¶
func SamplerOptionSeed(seed int64) SamplerOption
SamplerOptionSeed sets seed number.