C# Class xpidea.neuro.net.backprop.BackPropagationNetwork

Class implementing Backpropagation network.
The backpropagation technique is basically an extension of the adaline. The backpropagation network is a multilayer perceptron model with an input layer, one or more hidden layers, and an output layer. These layers are organized into interconnected layers, allowing the backpropagation network to escape the adaline's linear separability limitations making this network much more powerful. This approach was documented by Werbos (1974). The backpropagation network is used for problems that involve classification, projection, interpretation, and generalization. The nodes in the backpropagation neural network are interconnected via weighted links with each node usually connecting to the next layer up till the output layer which provides output for the network. The input patterns values are presented and assigned to the input nodes of the input layer. The input values are initialized to values between -1.1 and 1.1. The nodes in the next layer receive the input values through links and compute output values of their own, which are then passed to the next layer. These values propagate forward through the layers till the output layer is reached, or put another way, till each output layer node has produced an output value for the network. The desired output for the input pattern is used to compute an error value for each node in the output layer, and then propagated backwards (and here's where the network name comes in) through the network as the delta rule is used to adjust the link values to produce better the desired output. Once the error produced by the patterns in the training set is below a given tolerance, the training is complete and the network is presented new input patterns and produce an output based on the experience it gained from the learning process.
Inheritance: xpidea.neuro.net.adaline.AdalineNetwork
Mostrar archivo Open project: AlexCherkasov/Neuro.NET Class Usage Examples

Protected Properties

Property Type Description
firstMiddleNode int
firstOutputNode int

Public Methods

Method Description
BackPropagationNetwork ( ) : System

Creates not initialized instance of BackPropagation network.

BackPropagationNetwork ( double learningRate, double momentum, int nodesInEachLayer ) : System

Constructs the BackPropagation network.

BackPropagationNetwork ( string fileName ) : System

Creates the network from a file.

CreateLink ( ) : NeuroLink

Creates a link that will be used to constract the network. In case of xpidea.neuro.net.backprop.BackPropagationNetwork network a xpidea.neuro.net.backprop.BackPropagationLink link is created.

Learn ( ) : void

Overridden.Makes the network to learn the pattern that was just exposed to the network. Usually executes right after xpidea.neuro.net.backprop.BackPropagationNetwork.Run method. xpidea.neuro.net.backprop.BackPropagationNetwork.Run

Load ( BinaryReader binaryReader ) : void

Overridden.Loads network data from a binary stream.

NodesInLayer ( int index ) : int

Returns number of nodes in specific layer.

Run ( ) : void

Overridden.Tells the network to produce output values based on its input.

Save ( BinaryWriter binaryWriter ) : void

Overridden.Saves the network to a binary stream.

Train ( PatternsCollection patterns ) : void

Overridden.Performs network training. Here you write the code to train your network.

Protected Methods

Method Description
CreateNetwork ( ) : void

Overridden.Method that constructs network topology.

GetInputNodesCount ( ) : int

Overridden.Returns number of nodes in the input layer of the network.

GetNetworkType ( ) : NeuralNetworkType

Overridden.Returns type of the network.

Used for persistence purposes.

GetOutPutNodesCount ( ) : int

Overridden.Returns number of nodes in output layer of the network.

GetOutputNode ( int index ) : NeuroNode

Overridden.Returns output node of the network by its index.

Private Methods

Method Description
GetMiddleNode ( int index ) : NeuroNode
GetMiddleNodesCount ( ) : int
GetNodesInLayer ( int index ) : int

Method Details

BackPropagationNetwork() public method

Creates not initialized instance of BackPropagation network.
public BackPropagationNetwork ( ) : System
return System

BackPropagationNetwork() public method

Constructs the BackPropagation network.
public BackPropagationNetwork ( double learningRate, double momentum, int nodesInEachLayer ) : System
learningRate double Leraning rate of the network.
momentum double Momentum
nodesInEachLayer int Array of integers specifying number of nodes in each layer of the network.
return System

BackPropagationNetwork() public method

Creates the network from a file.
public BackPropagationNetwork ( string fileName ) : System
fileName string
return System

CreateLink() public method

Creates a link that will be used to constract the network. In case of xpidea.neuro.net.backprop.BackPropagationNetwork network a xpidea.neuro.net.backprop.BackPropagationLink link is created.
public CreateLink ( ) : NeuroLink
return NeuroLink

CreateNetwork() protected method

Overridden.Method that constructs network topology.
protected CreateNetwork ( ) : void
return void

GetInputNodesCount() protected method

Overridden.Returns number of nodes in the input layer of the network.
protected GetInputNodesCount ( ) : int
return int

GetNetworkType() protected method

Overridden.Returns type of the network.
Used for persistence purposes.
protected GetNetworkType ( ) : NeuralNetworkType
return NeuralNetworkType

GetOutPutNodesCount() protected method

Overridden.Returns number of nodes in output layer of the network.
protected GetOutPutNodesCount ( ) : int
return int

GetOutputNode() protected method

Overridden.Returns output node of the network by its index.
protected GetOutputNode ( int index ) : NeuroNode
index int Output node index.
return NeuroNode

Learn() public method

Overridden.Makes the network to learn the pattern that was just exposed to the network. Usually executes right after xpidea.neuro.net.backprop.BackPropagationNetwork.Run method. xpidea.neuro.net.backprop.BackPropagationNetwork.Run
public Learn ( ) : void
return void

Load() public method

Overridden.Loads network data from a binary stream.
public Load ( BinaryReader binaryReader ) : void
binaryReader System.IO.BinaryReader Binary stream reader.
return void

NodesInLayer() public method

Returns number of nodes in specific layer.
public NodesInLayer ( int index ) : int
index int Layer index.
return int

Run() public method

Overridden.Tells the network to produce output values based on its input.
public Run ( ) : void
return void

Save() public method

Overridden.Saves the network to a binary stream.
public Save ( BinaryWriter binaryWriter ) : void
binaryWriter System.IO.BinaryWriter Binary stream writer.
return void

Train() public method

Overridden.Performs network training. Here you write the code to train your network.
public Train ( PatternsCollection patterns ) : void
patterns xpidea.neuro.net.patterns.PatternsCollection Set of the patterns that will be exposed to a network during the training.
return void

Property Details

firstMiddleNode protected_oe property

Is a index of first middle layer node in the xpidea.neuro.net.NeuralNetwork.nodes array.
protected int firstMiddleNode
return int

firstOutputNode protected_oe property

Is a index of first output node in the xpidea.neuro.net.NeuralNetwork.nodes array.
protected int firstOutputNode
return int