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
-
-
Constructor Summary
Constructors Constructor and Description WTALayer()The default constructor for this WTALayer.WTALayer(java.lang.String ElemName)The constructor allowing a name to be specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidbackward(double[] pattern)No biases need updating or setting.java.util.TreeSetcheck()Check that there are no errors or problems with the properties of this WTALayer.voidforward(double[] pattern)This method accepts an array of values from the input and forwards it according to the Winner Takes All strategy.intgetLayerDepth()Getter for property LayerDepth.intgetLayerHeight()Getter for property LayerHeight.intgetLayerWidth()Getter for property LayerWidth.java.util.CollectionInspections()It doesn't make sense to return biases for this layervoidsetLayerDepth(int LayerDepth)Setter for property LayerDepth.voidsetLayerHeight(int LayerHeight)Setter for property LayerHeight.voidsetLayerWidth(int LayerWidth)Setter for property LayerWidth.-
Methods inherited from class org.joone.engine.SimpleLayer
getLearningRate, getLrate, getMomentum, setLrate, setMomentum, setMonitor
-
Methods inherited from class org.joone.engine.Layer
addInputSynapse, addNoise, addOutputSynapse, copyInto, finalize, fwdRun, getAllInputs, getAllOutputs, getBias, getDimension, getLastOutputs, getLayerName, getLearner, getMonitor, getRows, hasStepCounter, init, initLearner, InspectableTitle, isInputLayer, isOutputLayer, isRunning, join, randomize, removeAllInputs, removeAllOutputs, removeInputSynapse, removeOutputSynapse, revRun, run, setAllInputs, setAllOutputs, setBias, setInputSynapses, setLayerName, setOutputSynapses, setRows, start, stop, toString
-
-
-
-
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 JooneRuntimeExceptionNo biases need updating or setting. Not implemented / not required.
- 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 JooneRuntimeExceptionThis method accepts an array of values from the input and forwards it according to the Winner Takes All strategy. See class documentation.- Parameters:
pattern-Should be the euclidean distance between the previous synapse's input vector and weights.
- Throws:
JooneRuntimeException- ThisExceptionis 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:
checkin interfaceNeuralLayer- Overrides:
checkin classLayer- 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:
Inspectionsin interfaceInspectable- Overrides:
Inspectionsin classLayer- Returns:
- null
- See Also:
org.joone.Inspection
-
-
DataMelt 3.0 © DataMelt by jWork.ORG