xmachina

package
v0.0.0-...-31ccac1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 11 Imported by: 1

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(filename string, lines int, iterations int, parse func(record []string) (inp, out xmath.Vector), data DataSource, epoch Epoch, ack Ack) (inputSet, outputSet xmath.Matrix, readErr error)

func TrainInMem

func TrainInMem(config InMemTraining, network net.NN, inputSet xmath.Matrix, outputSet xmath.Matrix)

func TrainInStream

func TrainInStream(ctx context.Context, config InStreamTraining, network net.NN, data DataSource, ack Ack)

Types

type Ack

type Ack chan error

type Data

type Data interface {
	Init(sets ...Set) Data
	Add(name string, v ...float64)
	Export(index string) error
}

type DataSource

type DataSource chan Pair

type Epoch

type Epoch chan int

type InMemTraining

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

func Training

func Training(threshold float64, epochLogInterval int) InMemTraining

type InStreamTraining

type InStreamTraining struct {
	InMemTraining
	Epoch Epoch
	// contains filtered or unexported fields
}

func StreamingTraining

func StreamingTraining(cfg InMemTraining, outputSize int, inputLogInterval int) InStreamTraining

type NoSet

type NoSet struct {
}

func VoidSet

func VoidSet() *NoSet

func (*NoSet) Add

func (n *NoSet) Add(name string, v ...float64)

func (*NoSet) Export

func (n *NoSet) Export(index string) error

func (*NoSet) Init

func (n *NoSet) Init(sets ...Set) Data

type Pair

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

type Set

type Set struct {
	Name string
	X, Y string
}

Directories

Path Synopsis
net
ff
rc

Jump to

Keyboard shortcuts

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