Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.joone.engine
Class GaussianLayer  view GaussianLayer download GaussianLayer.java

java.lang.Object
  extended byorg.joone.engine.Layer
      extended byorg.joone.engine.SimpleLayer
          extended byorg.joone.engine.GaussianLayer
All Implemented Interfaces:
java.util.EventListener, org.joone.inspection.Inspectable, Learnable, LearnableLayer, NeuralLayer, NeuralNetListener, java.lang.Runnable, java.io.Serializable

public class GaussianLayer
extends SimpleLayer

This layer implements the Gaussian Neighborhood SOM strategy. It receives the euclidean distances between the input vector and weights and calculates the distance fall off between the winning node and all other nodes. These are passed back allowing the previous synapse to adjust it's weights.

The distance fall off is calculated according to a Gaussian distribution from the winning node. This layer uses implemtations of SpatialMap in order to calculate these distances. Currently this layer uses the GaussianSpatialMap which calculates the Gaussian distance for all nodes in the SOM map. Future maps will allow distance calculations based on a specific shape such as a circle , square or diamond. Currently the GuassianLayer supports 3D SOM maps.


Field Summary
private  double initialGaussianSize
           
private  int LayerDepth
           
private  int LayerHeight
           
private  int LayerWidth
           
private static org.joone.log.ILogger log
           
private  double NeighborhoodSize
           
private  int orderingPhase
           
private static long serialVersionUID
           
private  SpatialMap space_map
           
private  double timeConstant
           
 
Fields inherited from class org.joone.engine.SimpleLayer
 
Fields inherited from class org.joone.engine.Layer
bias, gradientInps, gradientOuts, inps, inputPatternListeners, learnable, learning, m_batch, monitor, myLearner, outputPatternListeners, outs, running, step, STOP_FLAG
 
Constructor Summary
GaussianLayer()
          The default constructor for this GaussianLayer.
GaussianLayer(java.lang.String ElemName)
          The constructor that takes a name of the layer.
 
Method Summary
 void backward(double[] pattern)
          This method has a blank body as there are no biases to adjust.
 java.util.TreeSet check()
          Check that there are no errors or problems with the properties of this GaussianLayer.
 void cicleTerminated(NeuralNetEvent e)
          Updates the Gaussian Size if in learning mode.
 void forward(double[] pattern)
          This method takes as input an array of euclidean distances between the input and weights calculated by the previous synapse.
 double getInitialGaussianSize()
          Getter for property initialGaussianSize.
 int getLargestDimension()
          Gets the largest layer dimension size.
 int getLayerDepth()
          Getter for property LayerDepth.
 int getLayerHeight()
          Getter for property LayerHeight.
 int getLayerWidth()
          Getter for property LayerWidth.
 int getOrderingPhase()
          Getter for property orderingPhase.
protected  SpatialMap getSpace_map()
          Getter for property space_map.
 double getTimeConstant()
          Getter for property timeConstant.
 java.util.Collection Inspections()
          It doesn't make sense to return biases for this layer
 void netStarted(NeuralNetEvent e)
          Initialises the time constant used to decrease the size of the spatial map.
 void setInitialGaussianSize(double initialGaussianSize)
          Setter for property initialGaussianSize.
 void setLayerDepth(int LayerDepth)
          Setter for property LayerDepth.
 void setLayerHeight(int LayerHeight)
          Setter for property LayerHeight.
 void setLayerWidth(int LayerWidth)
          Setter for property LayerWidth.
 void setOrderingPhase(int orderingPhase)
          Setter for property orderingPhase.
 void setTimeConstant(double timeConstant)
          Setter for property timeConstant.
 
Methods inherited from class org.joone.engine.SimpleLayer
getLearningRate, getLrate, getMomentum, setDimensions, setLrate, setMomentum, setMonitor
 
Methods inherited from class org.joone.engine.Layer
addInputSynapse, addNoise, addOutputSynapse, adjustSizeToFwdPattern, adjustSizeToRevPattern, checkInputEnabled, checkInputs, checkOutputs, copyInto, errorChanged, finalize, fireFwdGet, fireFwdPut, fireRevGet, fireRevPut, getAllInputs, getAllOutputs, getBias, getDimension, getLastOutputs, getLayerName, getLearner, getMonitor, getRows, getThreadMonitor, hasStepCounter, init, initLearner, InspectableTitle, isInputLayer, isOutputLayer, isRunning, join, netStopped, netStoppedError, randomize, removeAllInputs, removeAllOutputs, removeInputSynapse, removeOutputSynapse, resetInputListeners, run, setAllInputs, setAllOutputs, setBias, setConnDimensions, setInputDimension, setInputSynapses, setLayerName, setOutputDimension, setOutputSynapses, setRows, start, stop, sumBackInput, sumInput, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.joone.log.ILogger log

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

LayerWidth

private int LayerWidth

LayerHeight

private int LayerHeight

LayerDepth

private int LayerDepth

space_map

private SpatialMap space_map

timeConstant

private double timeConstant

orderingPhase

private int orderingPhase

initialGaussianSize

private double initialGaussianSize

NeighborhoodSize

private double NeighborhoodSize
Constructor Detail

GaussianLayer

public GaussianLayer()

The default constructor for this GaussianLayer.


GaussianLayer

public GaussianLayer(java.lang.String ElemName)
The constructor that takes a name of the layer.

Method Detail

backward

public void backward(double[] pattern)
              throws org.joone.exception.JooneRuntimeException

This method has a blank body as there are no biases to adjust.

Overrides:
backward in class SimpleLayer

forward

public void forward(double[] pattern)
             throws org.joone.exception.JooneRuntimeException

This method takes as input an array of euclidean distances between the input and weights calculated by the previous synapse. This method calculates the Gaussian distance fall off between the winning neuron and all other nodes. These distances are passed on to the next synapse.

Specified by:
forward in class Layer

getLayerDepth

public int getLayerDepth()
Getter for property LayerDepth.


setLayerDepth

public void setLayerDepth(int LayerDepth)
Setter for property LayerDepth.


getLayerHeight

public int getLayerHeight()
Getter for property LayerHeight.


setLayerHeight

public void setLayerHeight(int LayerHeight)
Setter for property LayerHeight.


getLayerWidth

public int getLayerWidth()
Getter for property LayerWidth.


setLayerWidth

public void setLayerWidth(int LayerWidth)
Setter for property LayerWidth.


getLargestDimension

public int getLargestDimension()
Gets the largest layer dimension size.


check

public java.util.TreeSet check()

Check that there are no errors or problems with the properties of this GaussianLayer.

Specified by:
check in interface NeuralLayer
Overrides:
check in class Layer

netStarted

public void netStarted(NeuralNetEvent e)

Initialises the time constant used to decrease the size of the spatial map.

Specified by:
netStarted in interface NeuralNetListener
Overrides:
netStarted in class Layer

cicleTerminated

public void cicleTerminated(NeuralNetEvent e)

Updates the Gaussian Size if in learning mode.

Specified by:
cicleTerminated in interface NeuralNetListener
Overrides:
cicleTerminated in class Layer

getOrderingPhase

public int getOrderingPhase()
Getter for property orderingPhase.


setOrderingPhase

public void setOrderingPhase(int orderingPhase)
Setter for property orderingPhase.


getTimeConstant

public double getTimeConstant()
Getter for property timeConstant.


setTimeConstant

public void setTimeConstant(double timeConstant)
Setter for property timeConstant.


getSpace_map

protected SpatialMap getSpace_map()
Getter for property space_map.


getInitialGaussianSize

public double getInitialGaussianSize()
Getter for property initialGaussianSize.


setInitialGaussianSize

public void setInitialGaussianSize(double initialGaussianSize)
Setter for property initialGaussianSize.


Inspections

public java.util.Collection Inspections()
It doesn't make sense to return biases for this layer

Specified by:
Inspections in interface org.joone.inspection.Inspectable
Overrides:
Inspections in class Layer