sobol

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectionNumber

type DirectionNumber struct {
	D uint32
	S uint32
	A uint32
	M []uint32
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine is Sobol's quasirandom number generator.

func NewEngine

func NewEngine(dimension uint32) *Engine

NewEngine returns Sobol's quasirandom number generator.

func (*Engine) Draw

func (e *Engine) Draw() []float64

Draw samples from Sobol sequence.

type Sampler

type Sampler struct {
	// contains filtered or unexported fields
}

Sampler for quasi-Monte Carlo Sampling based on Sobol sequence. It is recommended to use "SamplerOptionSkipInitialPoints(n)" for better performance. Furthermore, if you use this sampler from multiple workers, you need to specify different "n" argument for each workers to remove duplicated parameters.

func NewSampler

func NewSampler() *Sampler

NewSampler returns the Sobol sampler.

func (*Sampler) SampleRelative

func (s *Sampler) SampleRelative(study *goptuna.Study, trial goptuna.FrozenTrial, searchSpace map[string]interface{}) (map[string]float64, error)

SampleRelative samples multiple dimensional parameters in a given search space.

type SamplerOption added in v0.8.1

type SamplerOption func(sampler *Sampler)

SamplerOption is a type of function to set options.

func SamplerOptionSkipInitialPoints added in v0.8.1

func SamplerOptionSkipInitialPoints(nSamples uint32) SamplerOption

SamplerOptionSkipInitialPoints to skip the number of initial points. Joe&Kuo recommended to drop initial portion of sequence. Thereby, Sobol' sequence tends to perform better. This function takes 'nSamples' argument which is the number of points to be used (= the number of objective function calls), then skips the largest power of 2 points smaller than nSample.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL