Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.joone.engine
Class WTALayer

    java.lang.Object
      org.joone.engine.Layer
          org.joone.engine.SimpleLayer
              org.joone.engine.WTALayer

All Implemented Interfaces:
  java.io.Serializable, java.lang.Runnable, Learnable, LearnableLayer, NeuralLayer, Inspectable

    public class WTALayer

extends SimpleLayer

This layer implements the Winner Takes All SOM strategy. The layer expects to receive euclidean distances between the previous synapse weights and it's input. The layer simply works out which node is the winner and passes 1.0 for that node and 0.0 for the others.

See Also:
  `parent`, Serialized Form

Field Summary

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
`WTALayer()` The default constructor for this WTALayer.
`WTALayer(java.lang.String ElemName)` The constructor allowing a name to be specified.

Method Summary
`void` | `backward(double[] pattern)` No biases need updating or setting.
`java.util.TreeSet` | `check()` Check that there are no errors or problems with the properties of this WTALayer.
`void` | `forward(double[] pattern)` This method accepts an array of values from the input and forwards it according to the Winner Takes All strategy.
`int` | `getLayerDepth()` Getter for property LayerDepth.
`int` | `getLayerHeight()` Getter for property LayerHeight.
`int` | `getLayerWidth()` Getter for property LayerWidth.
`java.util.Collection` | `Inspections()` It doesn't make sense to return biases for this layer
`void` | `setLayerDepth(int LayerDepth)` Setter for property LayerDepth.
`void` | `setLayerHeight(int LayerHeight)` Setter for property LayerHeight.
`void` | `setLayerWidth(int LayerWidth)` Setter for property LayerWidth.

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, finalize, fireFwdGet, fireFwdPut, fireRevGet, fireRevPut, fwdRun, getAllInputs, getAllOutputs, getBias, getDimension, getLastOutputs, getLayerName, getLearner, getMonitor, getRows, getThreadMonitor, hasStepCounter, init, initLearner, InspectableTitle, isInputLayer, isOutputLayer, isRunning, join, randomize, removeAllInputs, removeAllOutputs, removeInputSynapse, removeListener, removeOutputSynapse, resetInputListeners, revRun, 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`

Constructor Detail

### WTALayer

    public WTALayer()

  The default constructor for this WTALayer.

### WTALayer

    public WTALayer(java.lang.String ElemName)

  The constructor allowing a name to be specified.

  Parameters:
    `ElemName` - The name of the Layer

Method Detail

### backward

    public void backward(double[] pattern)
                  throws JooneRuntimeException

  No biases need updating or setting. Not implemented / not required.

  Overrides:
    `backward` in class `SimpleLayer`
  Parameters:
    `pattern` - The pattern with which to update internal variables. Not required.
  Throws:
    `JooneRuntimeException` - The Joone Run time exception.

### forward

    public void forward(double[] pattern)
                 throws JooneRuntimeException

  This method accepts an array of values from the input and forwards it according to the Winner Takes All strategy. See class documentation.

  Specified by:
    `forward` in class `Layer`
  Parameters:
    `pattern` -

    Should be the euclidean distance between the previous synapse's input vector and weights.

  Throws:
    `JooneRuntimeException` - This `Exception` is a wrapper Exception when an Exception is thrown while doing the maths.
  See Also:
    `(double[])`

### getLayerDepth

    public int getLayerDepth()

  Getter for property LayerDepth.

  Returns:
    Value of property LayerDepth.

### setLayerDepth

    public void setLayerDepth(int LayerDepth)

  Setter for property LayerDepth.

  Parameters:
    `LayerDepth` - New value of property LayerDepth.

### getLayerHeight

    public int getLayerHeight()

  Getter for property LayerHeight.

  Returns:
    Value of property LayerHeight.

### setLayerHeight

    public void setLayerHeight(int LayerHeight)

  Setter for property LayerHeight.

  Parameters:
    `LayerHeight` - New value of property LayerHeight.

### getLayerWidth

    public int getLayerWidth()

  Getter for property LayerWidth.

  Returns:
    Value of property LayerWidth.

### setLayerWidth

    public void setLayerWidth(int LayerWidth)

  Setter for property LayerWidth.

  Parameters:
    `LayerWidth` - New value of property LayerWidth.

### check

    public java.util.TreeSet check()

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

  Specified by:
    `check` in interface `NeuralLayer`
  Overrides:
    `check` in class `Layer`
  Returns:
    The TreeSet of errors / problems if any.
  See Also:
    `NeuralLayer`

### Inspections

    public java.util.Collection Inspections()

  It doesn't make sense to return biases for this layer

  Specified by:
    `Inspections` in interface `Inspectable`
  Overrides:
    `Inspections` in class `Layer`
  Returns:
    null
  See Also:
    `org.joone.Inspection`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit Feedback to pmarrone@users.sourceforge.net