org.simnet.networks
Class LMSNetwork

java.lang.Object
  extended by org.simnet.interfaces.Network
      extended by org.simnet.networks.LMSNetwork
All Implemented Interfaces:
EventListener, WorldListener

public class LMSNetwork
extends Network

LMSNetwork implements a least means squared network.


Field Summary
 
Fields inherited from class org.simnet.interfaces.Network
CONTINUOUS, DISCRETE
 
Constructor Summary
LMSNetwork()
          Default constructor.
LMSNetwork(int nInputs, int nOutputs, Layout layout)
          Construct an LMS network with a specified number of input and output layers.
 
Method Summary
 int getDefaultInputs()
           
protected  LinearNeuron getDefaultNeuron()
          Return the default neuron, with settings, for LMS nets.
 int getDefaultOutputs()
           
 int getEpochs()
           
 double getEta()
           
 double getRMSError()
           
 File getTrainingINFile()
           
 double[][] getTrainingInputs()
           
 File getTrainingOUTFile()
           
 double[][] getTrainingOutputs()
           
 void init()
          Initialize the network.
 void iterate()
          Iterate network training.
 void setEpochs(int epochs)
           
 void setEta(double eta)
           
 void setTrainingINFile(File trainingINFile)
          Sets the input training file.
 void setTrainingInputs(double[][] trainingInputs)
           
 void setTrainingOUTFile(File trainingOUTFile)
          Sets the output training file.
 void setTrainingOutputs(double[][] trainingOutputs)
           
 void train()
          Train the network.
 void update()
          The core update function of the neural network.
 
Methods inherited from class org.simnet.interfaces.Network
addNetwork, addNetworkList, addNetworkListener, addNeuron, addNeuron, addNeuronList, addWeight, addWeight, changeNeuron, changeSynapse, checkAllBounds, clearActivations, clearInputs, close, deleteNetwork, deleteNeuron, deleteNeuron, deleteWeight, deleteWeight, fireClampChanged, fireCouplingChanged, fireNetworkChanged, fireNeuronAdded, fireNeuronChanged, fireNeuronDeleted, fireSubnetAdded, fireSubnetDeleted, fireSynapseAdded, fireSynapseChanged, fireSynapseDeleted, getClampNeurons, getClampWeights, getCouplingList, getDepth, getFlatNetworkList, getFlatNeuronList, getFlatSynapseList, getId, getIndents, getInputNeurons, getInteractionMode, getListenerList, getNetwork, getNetworkList, getNetworkParent, getNetworkThread, getNeuron, getNeuron, getNeuronCount, getNeuronList, getOutputNeurons, getPrecision, getRoot, getRoundingOff, getState, getSynapse, getTime, getTimeLabel, getTimeStep, getTimeType, getType, getUnits, getWeight, getWeight, getWeight, getWeightCount, getWeightList, getWorkspace, initNeurons, initParents, initWeights, isRoot, isRoundOffActivationValues, isUpdateCompleted, randomizeNeurons, randomizeWeights, removeNetworkListener, round, roundAll, setClampNeurons, setClampWeights, setId, setInteractionMode, setLowerBounds, setNetworkList, setNetworkParent, setNetworkThread, setNeuronList, setPrecision, setRoundingOff, setRoundOffActivationValues, setTime, setTimeStep, setUpdateCompleted, setUpperBounds, setWeightList, setWeightsToZero, setWorkspace, toString, updateAllNetworks, updateAllNeurons, updateAllWeights, updateIds, updateInputs, updateTime, updateTimeType, updateTopLevel, updateWorldListeners, updateWorlds, worldChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LMSNetwork

public LMSNetwork()
Default constructor.


LMSNetwork

public LMSNetwork(int nInputs,
                  int nOutputs,
                  Layout layout)
Construct an LMS network with a specified number of input and output layers.

Parameters:
nInputs - number of input nodes
nOutputs - number of output nodes
layout - layout of the new nodes
Method Detail

init

public void init()
Description copied from class: Network
Initialize the network.

Overrides:
init in class Network
See Also:
StandardNetwork

getDefaultNeuron

protected LinearNeuron getDefaultNeuron()
Return the default neuron, with settings, for LMS nets.

Returns:
the neuron, with appropriate settings, that should be used in building a LMS net.

update

public void update()
The core update function of the neural network. Calls the current update function on each neuron, decays all the neurons, and checks their bounds.

Specified by:
update in class Network

train

public void train()
Train the network.


iterate

public void iterate()
Iterate network training.


getRMSError

public double getRMSError()
Returns:
RMS Error

getEpochs

public int getEpochs()
Returns:
Returns the epochs.

setEpochs

public void setEpochs(int epochs)
Parameters:
epochs - The epochs to set.

getEta

public double getEta()
Returns:
Returns the eta.

setEta

public void setEta(double eta)
Parameters:
eta - The eta to set.

getTrainingInputs

public double[][] getTrainingInputs()
Returns:
Returns the training_inputs.

setTrainingInputs

public void setTrainingInputs(double[][] trainingInputs)
Parameters:
trainingInputs - The trainingInputs to set.

getTrainingOutputs

public double[][] getTrainingOutputs()
Returns:
Returns the trainingOutputs.

setTrainingOutputs

public void setTrainingOutputs(double[][] trainingOutputs)
Parameters:
trainingOutputs - The trainingOutputs to set.

getDefaultInputs

public int getDefaultInputs()
Returns:
Returns the defaultInputs.

getDefaultOutputs

public int getDefaultOutputs()
Returns:
Returns the defaultOutputs.

getTrainingINFile

public File getTrainingINFile()
Returns:
Returns the input training file.

setTrainingINFile

public void setTrainingINFile(File trainingINFile)
Sets the input training file.

Parameters:
trainingINFile - File to set input training

getTrainingOUTFile

public File getTrainingOUTFile()
Returns:
Returns the output training file.

setTrainingOUTFile

public void setTrainingOUTFile(File trainingOUTFile)
Sets the output training file.

Parameters:
trainingOUTFile - File to set output training