nnet

package module
v0.0.0-...-ddd9f17 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer struct {
	Type     string   `json:"type"`
	IsOutput bool     `json:"is_output"`
	Neuron   []Neuron `json:"Neuron"`
}

type Network

type Network struct {
	NetworkName    string   `json:"network_name"`
	OutputFunction string   `json:"output_function"`
	NumOutputs     int      `json:"num_outputs"`
	OutputNames    []string `json:"output_names"`
	Layer          []Layer  `json:"Layer"`
}

func CalcError

func CalcError(network Network, expected []float64) (Network, float64)

func Generate

func Generate(name string, num_inputs int, layer_array []int, layer_types []string, output_names []string, output_function string) Network

func GeneticRun

func GeneticRun(network Network, survival_rate float64, creature_count int, small_mutation_rate float64, iteration int, input_data [][]float64, expexted_data [][]float64, verbose bool) Network

func Run

func Run(network Network, input_data []float64) (Network, map[string]float64)

func UpdateWeights

func UpdateWeights(network Network, learningRate float64, inputData []float64) Network

type Neuron

type Neuron struct {
	Weights []float64 `json:"weights"`
	Error   float64   `json:"error"`
	Delta   float64   `json:"delta"`
	Output  float64   `json:"output"`
	Bias    float64   `json:"bias"`
}

Jump to

Keyboard shortcuts

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