Class KohonenSynapse
- java.lang.Object
-
- org.joone.engine.Synapse
-
- org.joone.engine.FullSynapse
-
- org.joone.engine.KohonenSynapse
-
- All Implemented Interfaces:
- java.io.Serializable, java.util.EventListener, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, NeuralNetListener, OutputPatternListener, Inspectable
public class KohonenSynapse extends FullSynapse implements NeuralNetListener
This is an unsupervised Kohonen Synapse which is a Self Organising Map.
This KohonenSynapse works in conjunction with the next layer which should implement a SOM strategy such as a GuassianLayer or WTALayer (Winner Takes All). This synapse should connect to one of these layers, without a SOM Strategy in the next layer this component will not function correctly.
This KohonenSynapse takes a pattern from the previous layer, calculates the distance between the input vector and the weights and passes this on to the next layer. In the learning phase the next layer should calculate the distance fall off between the winner and all other nodes (1.0 being the closest distance and 0.0 being furthest away and not being considered near to the winner). These distances are passed back to this KohonenSynapse and used to adjust the weights.
The weights are adjusted based on the current learning rate and distance fall off.
At each epoch/cycel the learning rate is adjusted in the following way ...
If the current cycle is within the ordering phase then the learning rate is set to
User setup learning rate * exp(-(double)(Current Cycle/Time Constant)).
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description KohonenSynapse()The default constructor for the KohonenSynapse class.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description java.util.TreeSetcheck()Check that there are no errors or problems with the properties of this KohonenSynapse.voidcicleTerminated(NeuralNetEvent e)Changes the learning rate for this synapse depending in the current epoch number.voiderrorChanged(NeuralNetEvent e)Not implemented.LearnergetLearner()Deprecated.- Used only for backward compatibilityintgetOrderingPhase()Getter for property orderingPhase.doublegetTimeConstant()Getter for property timeConstant.voidnetStarted(NeuralNetEvent e)Initialises any shape sizes such as circular radius and time constant before possible training.voidnetStopped(NeuralNetEvent e)Not implemented.voidnetStoppedError(NeuralNetEvent e, java.lang.String error)Not implemented.voidsetMonitor(Monitor newMonitor)Sets the Monitor object of the synapsevoidsetOrderingPhase(int orderingPhase)Setter for property orderingPhase.voidsetTimeConstant(double timeConstant)Setter for property timeConstant.-
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdGet, fwdPut, getIgnoreBefore, getInputDimension, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getWeights, init, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, reset, revGet, revPut, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setName, setOutputDimension, setOutputFull, setWeights
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.joone.engine.LearnableSynapse
getInputDimension, getLearningRate, getMomentum, getOutputDimension, getWeights, setWeights
-
Methods inherited from interface org.joone.engine.Learnable
getMonitor, initLearner
-
-
-
-
Constructor Detail
-
KohonenSynapse
public KohonenSynapse()
The default constructor for the KohonenSynapse class.
-
-
Method Detail
-
setMonitor
public void setMonitor(Monitor newMonitor)
Sets the Monitor object of the synapse- Specified by:
setMonitorin interfaceNeuralElement- Overrides:
setMonitorin classSynapse- Parameters:
newMonitor- neural.engine.Monitor
-
cicleTerminated
public void cicleTerminated(NeuralNetEvent e)
Changes the learning rate for this synapse depending in the current epoch number. The learning rate is changed in the following way ...
User setup learning rate * exp(-(double)(Current Cycle/Time Constant)).
- Specified by:
cicleTerminatedin interfaceNeuralNetListener- Parameters:
e- The original Net Event.
-
errorChanged
public void errorChanged(NeuralNetEvent e)
Not implemented.- Specified by:
errorChangedin interfaceNeuralNetListener- Parameters:
e- The original Net Event.
-
netStarted
public void netStarted(NeuralNetEvent e)
Initialises any shape sizes such as circular radius and time constant before possible training.- Specified by:
netStartedin interfaceNeuralNetListener- Parameters:
e- The original Net Event.
-
netStopped
public void netStopped(NeuralNetEvent e)
Not implemented.- Specified by:
netStoppedin interfaceNeuralNetListener- Parameters:
e- The original Net Event.
-
netStoppedError
public void netStoppedError(NeuralNetEvent e, java.lang.String error)
Not implemented.- Specified by:
netStoppedErrorin interfaceNeuralNetListener- Parameters:
e- The original Net Event.error- The error that caused this NetStoppedError event.
-
check
public java.util.TreeSet check()
Check that there are no errors or problems with the properties of this KohonenSynapse.
- Specified by:
checkin interfaceNeuralElement- Overrides:
checkin classSynapse- Returns:
- The TreeSet of errors / problems if any.
- See Also:
InputPaternListener,OutputPaternListener
-
getOrderingPhase
public int getOrderingPhase()
Getter for property orderingPhase.- Returns:
- Value of property orderingPhase.
-
setOrderingPhase
public void setOrderingPhase(int orderingPhase)
Setter for property orderingPhase.- Parameters:
orderingPhase- New value of property orderingPhase.
-
getTimeConstant
public double getTimeConstant()
Getter for property timeConstant.- Returns:
- Value of property timeConstant.
-
setTimeConstant
public void setTimeConstant(double timeConstant)
Setter for property timeConstant.- Parameters:
timeConstant- New value of property timeConstant.
-
getLearner
public Learner getLearner()
Deprecated. - Used only for backward compatibilityDescription copied from class:SynapseReturns the appropriate Learner object for this class depending on the Monitor.learningMode property value- Specified by:
getLearnerin interfaceLearnable- Overrides:
getLearnerin classFullSynapse- Returns:
- the Learner object if applicable, otherwise null
- See Also:
Learnable.getLearner()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG