engine

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.2.5

type Config struct {
	Tries               int
	Epochs              int
	TrainingSplit       float64
	LearningRate        float64
	Decay               float64
	RegressionThreshold float64
}

Config has all the learning configurations necessary to learn the netowrk in the engine

func DefaultConfig added in v0.2.5

func DefaultConfig() *Config

DefaultConfig returns the default config for the engine learner

type Engine

type Engine struct {
	NetworkInput     int
	NetworkLayer     []int
	NetworkOutput    int
	Data             *learn.Set
	WinnerNetwork    *neural.Network
	WinnerEvaluation evaluation.Evaluation
	Verbose          bool
	Usage            neural.NetworkType
	Config           *Config
}

Engine contains every necessary for starting the engine

func NewEngine

func NewEngine(usage neural.NetworkType, hiddenLayer []int, data *learn.Set) *Engine

NewEngine creates a new Engine object

func (*Engine) GetConfig added in v0.2.5

func (e *Engine) GetConfig() *Config

GetConfig returns the current engine learner configuration

func (*Engine) GetWinner

func (e *Engine) GetWinner() (*neural.Network, *evaluation.Evaluation)

GetWinner returns the winner network from training

func (*Engine) SetConfig added in v0.2.5

func (e *Engine) SetConfig(cfg *Config)

SetConfig sets a new config from outside for the engine learner

func (*Engine) SetRegressionThreshold

func (e *Engine) SetRegressionThreshold(threshold float64)

SetRegressionThreshold sets the evaluation threshold for the regression

func (*Engine) SetVerbose

func (e *Engine) SetVerbose(verbose bool)

SetVerbose set verbose mode default = false

func (*Engine) Start

func (e *Engine) Start(criterion neural.Criterion)

Start takes the paramter to start the engine and run it

Jump to

Keyboard shortcuts

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