C# Class xpidea.neuro.net.NeuralNetwork

Base abstract class for all neural networks.
Inheritance: NeuroNode
Afficher le fichier Open project: AlexCherkasov/Neuro.NET

Protected Properties

Свойство Type Description
links xpidea.neuro.net.NeuroLink[]
linksCount int
nodes xpidea.neuro.net.NeuroNode[]
nodesCount int

Méthodes publiques

Méthode Description
Epoch ( int epoch ) : void

Overridden.Finalizes trainig cycle of the network. Used by xpidea.neuro.net.NeuralNetwork.Train method of the network.

InputNode ( int index ) : NeuroNode

Returns N-th input node of the network.xpidea.neuro.net.NeuralNetwork.InputNodesCount

Load ( BinaryReader binaryReader ) : void

Overridden.Loads network data from a binary stream.

NeuralNetwork ( ) : System

Constructor. Creates new instance of the network.

NeuralNetwork ( string fileName ) : System

Creates the network and loads it's state from a file.

OutputNode ( int index ) : NeuroNode

Returns N-th output node of the network. xpidea.neuro.net.NeuralNetwork.OutputNodesCount

Save ( BinaryWriter binaryWriter ) : void

Overridden.Saves the network to a binary stream.

Train ( PatternsCollection patterns ) : void

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

There are several major paradigms, or approaches, to neural network learning. These include supervised, unsupervised, and reinforcement learning. How the training data is processed is a major aspect of these learning paradigms.

Supervised learning is the most common form of learning and is sometimes called programming by example. The neural network is trained by showing it examples of the problem state or attributes along with the desired output or action. The neural network makes a prediction based on the inputs and if the output differs from the desired out put, then the network is adjusted or adapted to produce the correct output. This process is repeated over and over until the agent learns to make accurate classifications or predictions. Historical data from databases, sensor logs, or trace logs is often used as the training or example data.

Unsupervised learning is used when the neural network needs to recognize similarities between inputs or to identify features in the input data. The data is presented to the network, and it adapts so that it partitions the data into groups. The clustering or segmenting process continues until the neural network places the same data into the same group on successive passes over the data. An unsupervised learning algorithm performs a type of feature detection where important common attributes in the data are extracted. The Kohonen map will be a good example of the network using unsupervised learning.

Reinforcement learning is a type of supervised learning used when explicit input/ output pairs of training data are not available. It can be used in cases where there is a sequence of inputs arid the desired output is only known after the specific sequence occurs. This process of identifying the relationship between a series of input values and a later output value is called temporal credit assignment. Because we provide less specific error information, reinforcement learning usually takes longer than supervised learning and is less efficient. However, in many situations, having exact prior information about the desired outcome is not possible. In many ways, reinforcement learning is the most realistic form of learning.

Méthodes protégées

Méthode Description
CreateNetwork ( ) : void

Performs network construction based on specific topology. Connects all nodes in the network using the links.

GetInputNode ( int index ) : NeuroNode

Returns N-th input node in the network.

GetInputNodesCount ( ) : int

Returns number of input nodes in the network.

GetNetworkType ( ) : NeuralNetworkType

Neural network type.

GetOutPutNodesCount ( ) : int

Returns number of output nodes in the network.

GetOutputNode ( int index ) : NeuroNode

Returns N-th output node in the network.

LoadInputs ( ) : void

Loads data into input nodes of the network.

Private Methods

Méthode Description
CheckNetworkType ( BinaryReader binaryReader ) : void
SaveNetworkType ( BinaryWriter binaryWriter ) : void

Method Details

CreateNetwork() protected méthode

Performs network construction based on specific topology. Connects all nodes in the network using the links.
protected CreateNetwork ( ) : void
Résultat void

Epoch() public méthode

Overridden.Finalizes trainig cycle of the network. Used by xpidea.neuro.net.NeuralNetwork.Train method of the network.
public Epoch ( int epoch ) : void
epoch int Number of patterns was exposed to the network.
Résultat void

GetInputNode() protected abstract méthode

Returns N-th input node in the network.
protected abstract GetInputNode ( int index ) : NeuroNode
index int Node index.
Résultat NeuroNode

GetInputNodesCount() protected abstract méthode

Returns number of input nodes in the network.
protected abstract GetInputNodesCount ( ) : int
Résultat int

GetNetworkType() protected abstract méthode

Neural network type.
protected abstract GetNetworkType ( ) : NeuralNetworkType
Résultat NeuralNetworkType

GetOutPutNodesCount() protected abstract méthode

Returns number of output nodes in the network.
protected abstract GetOutPutNodesCount ( ) : int
Résultat int

GetOutputNode() protected abstract méthode

Returns N-th output node in the network.
protected abstract GetOutputNode ( int index ) : NeuroNode
index int Node index.
Résultat NeuroNode

InputNode() public méthode

Returns N-th input node of the network.xpidea.neuro.net.NeuralNetwork.InputNodesCount
public InputNode ( int index ) : NeuroNode
index int Node index.
Résultat NeuroNode

Load() public méthode

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

LoadInputs() protected méthode

Loads data into input nodes of the network.
protected LoadInputs ( ) : void
Résultat void

NeuralNetwork() public méthode

Constructor. Creates new instance of the network.
public NeuralNetwork ( ) : System
Résultat System

NeuralNetwork() public méthode

Creates the network and loads it's state from a file.
public NeuralNetwork ( string fileName ) : System
fileName string A file name.
Résultat System

OutputNode() public méthode

Returns N-th output node of the network. xpidea.neuro.net.NeuralNetwork.OutputNodesCount
public OutputNode ( int index ) : NeuroNode
index int Node index
Résultat NeuroNode

Save() public méthode

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

Train() public méthode

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

There are several major paradigms, or approaches, to neural network learning. These include supervised, unsupervised, and reinforcement learning. How the training data is processed is a major aspect of these learning paradigms.

Supervised learning is the most common form of learning and is sometimes called programming by example. The neural network is trained by showing it examples of the problem state or attributes along with the desired output or action. The neural network makes a prediction based on the inputs and if the output differs from the desired out put, then the network is adjusted or adapted to produce the correct output. This process is repeated over and over until the agent learns to make accurate classifications or predictions. Historical data from databases, sensor logs, or trace logs is often used as the training or example data.

Unsupervised learning is used when the neural network needs to recognize similarities between inputs or to identify features in the input data. The data is presented to the network, and it adapts so that it partitions the data into groups. The clustering or segmenting process continues until the neural network places the same data into the same group on successive passes over the data. An unsupervised learning algorithm performs a type of feature detection where important common attributes in the data are extracted. The Kohonen map will be a good example of the network using unsupervised learning.

Reinforcement learning is a type of supervised learning used when explicit input/ output pairs of training data are not available. It can be used in cases where there is a sequence of inputs arid the desired output is only known after the specific sequence occurs. This process of identifying the relationship between a series of input values and a later output value is called temporal credit assignment. Because we provide less specific error information, reinforcement learning usually takes longer than supervised learning and is less efficient. However, in many situations, having exact prior information about the desired outcome is not possible. In many ways, reinforcement learning is the most realistic form of learning.

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.
Résultat void

Property Details

links protected_oe property

Links in the network.
protected NeuroLink[],xpidea.neuro.net links
Résultat xpidea.neuro.net.NeuroLink[]

linksCount protected_oe property

Number of links in the network.
protected int linksCount
Résultat int

nodes protected_oe property

Nodes in the netowrk.
protected NeuroNode[],xpidea.neuro.net nodes
Résultat xpidea.neuro.net.NeuroNode[]

nodesCount protected_oe property

Number of nodes in the network.
protected int nodesCount
Résultat int