Documentation
¶
Index ¶
- func LogisticFunc(x, a float64) float64
- type ActivationFunction
- type Criterion
- type Enter
- type Layer
- type Network
- func (n *Network) Calculate(enters []float64) []float64
- func (n *Network) CalculateLabels(enters []float64) map[string]float64
- func (n *Network) CalculateWinnerLabel(enters []float64) string
- func (n *Network) ConnectEnters()
- func (n *Network) ConnectLayers()
- func (n *Network) RandomizeSynapses()
- func (n *Network) SetActivationFunction(aFunc ActivationFunction)
- type NetworkType
- type Neuron
- type Synapse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogisticFunc ¶
LogisticFunc returns the value of the logistic function for x and a
Types ¶
type ActivationFunction ¶
ActivationFunction function definition of activation functions
func NewLogisticFunc ¶
func NewLogisticFunc(a float64) ActivationFunction
NewLogisticFunc applies and returns the Logistic function
type Criterion ¶
type Criterion int
const ( // Accuracy decides evaluation by accuracy Accuracy Criterion = iota // BalancedAccuracy decides evaluation by balanced accuracy BalancedAccuracy // FMeasure decides evaluation by f-measure FMeasure // Simple decides on simple wrong/correct ratio Simple // Distance decides evaluation by distance to ideal output Distance )
type Network ¶
type Network struct {
Enters []*Enter
Layers []*Layer
Out []float64 `json:"-"`
OutLabels map[int]string
}
Network contains all the necessary information to use the neural network
func BuildNetwork ¶
BuildNetwork builds a neural network from parameters given
func NewNetwork ¶
NewNetwork creates a new neural network
func (*Network) CalculateLabels ¶
CalculateLabels output with all labels of output neurons
func (*Network) CalculateWinnerLabel ¶
CalculateWinnerLabel calculates the output and just returns the label of the winning euron
func (*Network) ConnectEnters ¶
func (n *Network) ConnectEnters()
ConnectEnters connects the input neurons with the first hidden layer
func (*Network) ConnectLayers ¶
func (n *Network) ConnectLayers()
ConnectLayers connects all layers with corresponding neurons
func (*Network) RandomizeSynapses ¶
func (n *Network) RandomizeSynapses()
RandomizeSynapses applies a random value to all synapses
func (*Network) SetActivationFunction ¶
func (n *Network) SetActivationFunction(aFunc ActivationFunction)
SetActivationFunction sets the activation function for the network
type NetworkType ¶
type NetworkType int
const ( // Classification describes the mode of operation: classification Classification NetworkType = iota // Regression describes the mode of operation: regression Regression )
type Neuron ¶
type Neuron struct {
OutSynapses []*Synapse
InSynapses []*Synapse `json:"-"`
ActivationFunction ActivationFunction `json:"-"`
Out float64 `json:"-"`
}
Neuron holds the data a neuron needs
func (*Neuron) Calculate ¶
func (n *Neuron) Calculate()
Calculate calculates the actual neuron activity
func (*Neuron) SetActivationFunction ¶
func (n *Neuron) SetActivationFunction(aFunc ActivationFunction)
SetActivationFunction sets the activation function for the neuron
type Synapse ¶
Synapse holds the synapse structure
func NewSynapseFromTo ¶
NewSynapseFromTo creates a new synapse from neuron to neuron
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
online-generator
command
|
|
|
online-sonar
command
|
|
|
sonar
command
|
|
|
wine-quality
command
|
|
