C# Class xpidea.neuro.net.bam.BidirectionalAssociativeMemoryNetwork

Implements the Bidirectional Associative Memory (BAM) network.
The Bidirectional Associative Memory (BAM) network that consists of two layers. An input layer and an output layer. The main difference between backpropagation architecture is that BAM does not stop learning when input values reach the output layer. The learning phase stops when the network becomes stable ; no change between input and output values during two consecutive cycles. The pattern sets for training and running and ouput results can only have two values : 1.1 or -1.1. The BAM is a relatively simple neural network architecture with a content addressable memory. BAM is usefull for pattern recognition or with noisy and corrupted patterns. Bam can also "forget" if there are two many patterns in it. BAM becomes saturated when the number of patterns stored is greater than the minimum of the input layer count and the ouput layer node count. BAM System is created to solve this problem.
Inheritance: xpidea.neuro.net.adaline.AdalineNetwork
ファイルを表示 Open project: AlexCherkasov/Neuro.NET Class Usage Examples

Protected Properties

Property Type Description
inputLayerNodesCount int
outputLayerNodesCount int

Public Methods

Method Description
BidirectionalAssociativeMemoryNetwork ( int aInputNodesCount, int aOutputNodesCount ) : System

Creates BAM network.

BidirectionalAssociativeMemoryNetwork ( string fileName ) : System

Creates the network from a file.

Learn ( ) : void

Overridden.Teaches the network.

Load ( BinaryReader binaryReader ) : void

Overridden.Loads network data from a binary stream.

Run ( ) : void

Overridden.Runs the network.

Save ( BinaryWriter binaryWriter ) : void

Overridden.Stores network data in the binary stream.

SetValues ( int index, double value ) : void

Sets value of the node.

SetValuesFromPattern ( Pattern pattern ) : void

Overridden.Loads the values into the input layer from the pattern.

Train ( PatternsCollection patterns ) : void

Overridden.Trains the network to recognize specific patterns. Employs xpidea.neuro.net.bam.BidirectionalAssociativeMemoryOutputNode.Run and xpidea.neuro.net.bam.BidirectionalAssociativeMemoryOutputNode.Learn to teach the network.

UnLearn ( ) : void

Tells the network to "forget" last learn operation.

value ( int index ) : double

Returns value of the output node specified by index.

Protected Methods

Method Description
CreateNetwork ( ) : void

Overridden.Constucts the network topology.

GetInputNodesCount ( ) : int

Overridden.Returns nodes count in the input layer.

GetNetworkType ( ) : NeuralNetworkType

Overridden.Returns xpidea.neuro.net.NeuralNetworkType.nntBAM for the BAM network.

GetNodeError ( ) : double

Overridden.Returns node error.

GetOutPutNodesCount ( ) : int

Overridden.Returns nodes count in output layer.

GetOutputNode ( int index ) : NeuroNode

Overridden.Returns output node by its index.

LoadInputs ( ) : void

Overridden.Loads input values into the input layer.

Method Details

BidirectionalAssociativeMemoryNetwork() public method

Creates BAM network.
public BidirectionalAssociativeMemoryNetwork ( int aInputNodesCount, int aOutputNodesCount ) : System
aInputNodesCount int Number of nodes in the input layer.
aOutputNodesCount int Number of nodes in the output layer.
return System

BidirectionalAssociativeMemoryNetwork() public method

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

CreateNetwork() protected method

Overridden.Constucts the network topology.
protected CreateNetwork ( ) : void
return void

GetInputNodesCount() protected method

Overridden.Returns nodes count in the input layer.
protected GetInputNodesCount ( ) : int
return int

GetNetworkType() protected method

Overridden.Returns xpidea.neuro.net.NeuralNetworkType.nntBAM for the BAM network.
protected GetNetworkType ( ) : NeuralNetworkType
return NeuralNetworkType

GetNodeError() protected method

Overridden.Returns node error.
protected GetNodeError ( ) : double
return double

GetOutPutNodesCount() protected method

Overridden.Returns nodes count in output layer.
protected GetOutPutNodesCount ( ) : int
return int

GetOutputNode() protected method

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

Learn() public method

Overridden.Teaches the network.
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

LoadInputs() protected method

Overridden.Loads input values into the input layer.
protected LoadInputs ( ) : void
return void

Run() public method

Overridden.Runs the network.
public Run ( ) : void
return void

Save() public method

Overridden.Stores network data in the binary stream.
public Save ( BinaryWriter binaryWriter ) : void
binaryWriter System.IO.BinaryWriter Binary stream writer.
return void

SetValues() public method

Sets value of the node.
public SetValues ( int index, double value ) : void
index int Node index.
value double New node value.
return void

SetValuesFromPattern() public method

Overridden.Loads the values into the input layer from the pattern.
public SetValuesFromPattern ( Pattern pattern ) : void
pattern xpidea.neuro.net.patterns.Pattern Pattern.
return void

Train() public method

Overridden.Trains the network to recognize specific patterns. Employs xpidea.neuro.net.bam.BidirectionalAssociativeMemoryOutputNode.Run and xpidea.neuro.net.bam.BidirectionalAssociativeMemoryOutputNode.Learn to teach the network.
public Train ( PatternsCollection patterns ) : void
patterns xpidea.neuro.net.patterns.PatternsCollection Training patterns.
return void

UnLearn() public method

Tells the network to "forget" last learn operation.
public UnLearn ( ) : void
return void

value() public method

Returns value of the output node specified by index.
public value ( int index ) : double
index int Node index.
return double

Property Details

inputLayerNodesCount protected_oe property

Stores nodes count in input layer.
protected int inputLayerNodesCount
return int

outputLayerNodesCount protected_oe property

Stores nodes count in output layer.
protected int outputLayerNodesCount
return int