com.ewasystems.dm.neural.nn
Class NeuralNetworkModel

java.lang.Object
  |
  +--com.ewasystems.dm.AbstractEngineModel
        |
        +--com.ewasystems.dm.neural.nn.NeuralNetworkModel
All Implemented Interfaces:
java.lang.Cloneable, com.ewasystems.dm.util.DirectedAcyclicGraph, java.io.Serializable

public class NeuralNetworkModel
extends com.ewasystems.dm.AbstractEngineModel
implements com.ewasystems.dm.util.DirectedAcyclicGraph

Title: NeuralNetworkModel

Description: A Neural Network Model Containing Neuron DAG

Copyright: (c) 1998 - 2005

Company: EWA Systems

See Also:
Serialized Form

Constructor Summary
NeuralNetworkModel()
          Constructs an Empty Neural Network Model
NeuralNetworkModel(int[] layerSizes, int layerType)
          Constructs a Neural Network Model
NeuralNetworkModel(int[] layerSizes, int[] layerTypes)
          Constructs an Neural Network Model
 
Method Summary
 NeuralLayer createLayer(int size, int type)
          Create a Neural Layer
 Neuron createNeuron(int type)
          Creates a New Neuron
 void destroyLayer(NeuralLayer layer)
          Disconnects and Destroys a Neural Layer
 void destroyNeuron(Neuron neuron)
          Disconnects and Destroys a Neuron
 java.util.HashSet getAllDAGNodes()
          Gets all of the Neurons
 com.ewasystems.dm.AbstractEngineConfig getConfig()
          Gets the Engine Configuation
 NeuralLayer getCyclicSourceLayer()
          Returns the First Layer in the Network (Usually the Source Layer)
 NeuralLayer getCyclicTargetLayer()
          Returns the Last Layer in the Network (Usually the Target Layer)
 double getDataMSE()
          Gets the Data Mean Squared Error
 int getLayerCount()
          Gets the Number of Hidden Network Layers
 java.util.Iterator getLayerIterator()
          Gets the Hidden Layer Iterator
 com.ewasystems.util.ExtensionFileFilter getModelFileFilter()
          Gets the Model File Filter
 int getNeuronCount()
          Returns the Total Number of Neurons in the Network
 java.util.Iterator getNeuronIterator()
          Gets an Neuron Iterator
 NeuralLayer getSourceLayer()
          Returns the First Layer in the Network (Usually the Source Layer)
 NeuralLayer getTargetLayer()
          Returns the Last Layer in the Network (Usually the Target Layer)
 double getTestMSE()
          Gets the Test Mean Squared Error
 void initializeNetwork()
          Initializes the Network By Setting Random Weights on All Neurons
 void setConfig(com.ewasystems.dm.AbstractEngineConfig config)
          Sets the Engine Configuation
 void setCyclicSourceLayer(NeuralLayer cyclicSourceLayer)
          Returns the First Layer in the Network (Usually the Source Layer)
 void setCyclicTargetLayer(NeuralLayer cyclicTargetLayer)
          Returns the First Layer in the Network (Usually the Source Layer)
 void setSourceLayer(NeuralLayer sourceLayer)
          Returns the First Layer in the Network (Usually the Source Layer)
 void setTargetLayer(NeuralLayer targetLayer)
          Returns the First Layer in the Network (Usually the Source Layer)
 boolean validateModel()
          Validates the DAG
 
Methods inherited from class com.ewasystems.dm.AbstractEngineModel
loadModel, saveModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeuralNetworkModel

public NeuralNetworkModel()
Constructs an Empty Neural Network Model

NeuralNetworkModel

public NeuralNetworkModel(int[] layerSizes,
                          int layerType)
Constructs a Neural Network Model
Parameters:
layerSizes - The Layer Sizes
layerType - The Neuron Type

NeuralNetworkModel

public NeuralNetworkModel(int[] layerSizes,
                          int[] layerTypes)
Constructs an Neural Network Model
Parameters:
layerSizes - The Layer Sizes
layerTypes - The Neuron Types
Method Detail

createLayer

public NeuralLayer createLayer(int size,
                               int type)
Create a Neural Layer
Parameters:
size - The Number of Neurons in the Layer
type - The Type of Neurons in the Layer
Returns:
The Neural Layer

createNeuron

public Neuron createNeuron(int type)
Creates a New Neuron
Parameters:
type - The Neuron Type
Returns:
The Neuron

destroyLayer

public void destroyLayer(NeuralLayer layer)
Disconnects and Destroys a Neural Layer
Parameters:
layer - The Neural Layer

destroyNeuron

public void destroyNeuron(Neuron neuron)
Disconnects and Destroys a Neuron
Parameters:
neuron - The Neuron

getAllDAGNodes

public java.util.HashSet getAllDAGNodes()
Gets all of the Neurons
Specified by:
getAllDAGNodes in interface com.ewasystems.dm.util.DirectedAcyclicGraph
Returns:
HashSet: The Set of DAG Nodes

getConfig

public com.ewasystems.dm.AbstractEngineConfig getConfig()
Gets the Engine Configuation
Overrides:
getConfig in class com.ewasystems.dm.AbstractEngineModel

getCyclicSourceLayer

public NeuralLayer getCyclicSourceLayer()
Returns the First Layer in the Network (Usually the Source Layer)

getCyclicTargetLayer

public NeuralLayer getCyclicTargetLayer()
Returns the Last Layer in the Network (Usually the Target Layer)

getDataMSE

public double getDataMSE()
Gets the Data Mean Squared Error
Returns:
The Data MSE

getLayerCount

public int getLayerCount()
Gets the Number of Hidden Network Layers

getLayerIterator

public java.util.Iterator getLayerIterator()
Gets the Hidden Layer Iterator
Returns:
Iterator: The Layer Iterator

getModelFileFilter

public com.ewasystems.util.ExtensionFileFilter getModelFileFilter()
Gets the Model File Filter
Overrides:
getModelFileFilter in class com.ewasystems.dm.AbstractEngineModel
Returns:
ExtensionFileFilter The Model File Filter

getNeuronCount

public int getNeuronCount()
Returns the Total Number of Neurons in the Network

getNeuronIterator

public java.util.Iterator getNeuronIterator()
Gets an Neuron Iterator
Returns:
The Iterator

getSourceLayer

public NeuralLayer getSourceLayer()
Returns the First Layer in the Network (Usually the Source Layer)

getTargetLayer

public NeuralLayer getTargetLayer()
Returns the Last Layer in the Network (Usually the Target Layer)

getTestMSE

public double getTestMSE()
Gets the Test Mean Squared Error
Returns:
The Test MSE

initializeNetwork

public void initializeNetwork()
Initializes the Network By Setting Random Weights on All Neurons

setConfig

public void setConfig(com.ewasystems.dm.AbstractEngineConfig config)
Sets the Engine Configuation
Parameters:
config - The Engine Configuration

setCyclicSourceLayer

public void setCyclicSourceLayer(NeuralLayer cyclicSourceLayer)
Returns the First Layer in the Network (Usually the Source Layer)
Parameters:
cyclicSourceLayer - The First Neural Layer

setCyclicTargetLayer

public void setCyclicTargetLayer(NeuralLayer cyclicTargetLayer)
Returns the First Layer in the Network (Usually the Source Layer)
Parameters:
cyclicTargetLayer - The First Neural Layer

setSourceLayer

public void setSourceLayer(NeuralLayer sourceLayer)
Returns the First Layer in the Network (Usually the Source Layer)
Parameters:
sourceLayer - The First Neural Layer

setTargetLayer

public void setTargetLayer(NeuralLayer targetLayer)
Returns the First Layer in the Network (Usually the Source Layer)
Parameters:
targetLayer - The First Neural Layer

validateModel

public boolean validateModel()
Validates the DAG
Returns:
True if Valid