efficacy

package
v0.0.0-...-77f7900 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field byte

Field is the type of field being collected

const (
	BatchNumber Field = iota
	Began
	Ended
	Solved
	Generations
	Evaluations
	Seconds
	Fitness
	Novelty
	Encoded
	EncodedNodes
	EncodedConns
	Decoded
	DecodedNodes
	DecodedConns
)

Known fields

func (Field) String

func (f Field) String() string

String returns a text description of the field

type Method

type Method byte

Method is the aggregrate function

const (
	Min Method = iota
	Max
	Mean
	Median
	Best // values from the most fit genome
)

Known methods

func (Method) String

func (m Method) String() string

String provides the text description of the method

type Sample

type Sample struct {
	BatchNumber int
	Began       time.Time
	Ended       time.Time
	Solved      bool
	Generations int
	Evaluations int
	Seconds     float64
	Values      map[Field]map[Method]float64
}

Sample is the result of an evaluation run

type Sampler

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

Sampler records the results of an experiment's run

func NewSampler

func NewSampler(filename string) (*Sampler, error)

NewSampler creates a new efficacy sampler

func (*Sampler) Callbacks

func (s *Sampler) Callbacks(num int) (start, complete evo.Callback)

Callbacks returns a new listener callback function for the given batch number.

func (*Sampler) Close

func (s *Sampler) Close() error

Close the underlying writer returning any error from that action

func (*Sampler) Record

func (s *Sampler) Record(sample Sample) error

Record appends the sample to the file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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