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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址