|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.joone.engine.Synapse
org.joone.engine.FullSynapse
org.joone.engine.KohonenSynapse
public class KohonenSynapse
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)).
Field Summary | |
---|---|
(package private) double |
currentLearningRate
|
Fields inherited from class org.joone.engine.Synapse |
---|
array, b_pattern, bitems, bouts, count, enabled, fwdLock, inps, items, learnable, m_batch, m_pattern, myLearner, outs, revLock |
Constructor Summary | |
---|---|
KohonenSynapse()
The default constructor for the KohonenSynapse class. |
Method Summary | |
---|---|
protected void |
backward(double[] pattern)
Adjusts the weights of this Kohonen Synapse according to the neighborhood fall off distance calculated by the next layer. |
java.util.TreeSet |
check()
Check that there are no errors or problems with the properties of this KohonenSynapse. |
void |
cicleTerminated(NeuralNetEvent e)
Changes the learning rate for this synapse depending in the current epoch number. |
void |
errorChanged(NeuralNetEvent e)
Not implemented. |
protected void |
forward(double[] pattern)
Fowards the euclidean distance squared between the input vector and the weight vector to the next layer. |
Learner |
getLearner()
Deprecated. - Used only for backward compatibility |
int |
getOrderingPhase()
Getter for property orderingPhase. |
double |
getTimeConstant()
Getter for property timeConstant. |
void |
netStarted(NeuralNetEvent e)
Initialises any shape sizes such as circular radius and time constant before possible training. |
void |
netStopped(NeuralNetEvent e)
Not implemented. |
void |
netStoppedError(NeuralNetEvent e,
java.lang.String error)
Not implemented. |
void |
setMonitor(Monitor newMonitor)
Sets the Monitor object of the synapse |
void |
setOrderingPhase(int orderingPhase)
Setter for property orderingPhase. |
void |
setTimeConstant(double timeConstant)
Setter for property timeConstant. |
Methods inherited from class org.joone.engine.FullSynapse |
---|
setArrays, setDimensions |
Methods inherited from class org.joone.engine.Synapse |
---|
addNoise, canCountSteps, fwdGet, fwdPattern_consume, fwdPattern_produce, fwdPut, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getSynapseNameSafely, getWeights, init, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, reset, revGet, revPattern_consume, revPattern_produce, revPut, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setName, setOutputDimension, setOutputFull, setWeights, warnLogger, warnLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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 |
Field Detail |
---|
double currentLearningRate
Constructor Detail |
---|
public KohonenSynapse()
The default constructor for the KohonenSynapse class.
Method Detail |
---|
protected void backward(double[] pattern)
Adjusts the weights of this Kohonen Synapse according to the neighborhood fall off distance calculated by the next layer.
backward
in class FullSynapse
pattern
- The pattern with the distance fall off's between the winner and all other nodes.
(1.0 is the winner through 0.0 having no similarity to the original input
vector)protected void forward(double[] pattern)
forward
in class FullSynapse
pattern
- The pattern containg the euclidean distance squared between each weight and the
input.public void setMonitor(Monitor newMonitor)
setMonitor
in interface NeuralElement
setMonitor
in class Synapse
newMonitor
- neural.engine.Monitorpublic 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)).
cicleTerminated
in interface NeuralNetListener
e
- The original Net Event.public void errorChanged(NeuralNetEvent e)
errorChanged
in interface NeuralNetListener
e
- The original Net Event.public void netStarted(NeuralNetEvent e)
netStarted
in interface NeuralNetListener
e
- The original Net Event.public void netStopped(NeuralNetEvent e)
netStopped
in interface NeuralNetListener
e
- The original Net Event.public void netStoppedError(NeuralNetEvent e, java.lang.String error)
netStoppedError
in interface NeuralNetListener
e
- The original Net Event.error
- The error that caused this NetStoppedError event.public java.util.TreeSet check()
Check that there are no errors or problems with the properties of this KohonenSynapse.
check
in interface NeuralElement
check
in class Synapse
InputPaternListener
,
OutputPaternListener
public int getOrderingPhase()
public void setOrderingPhase(int orderingPhase)
orderingPhase
- New value of property orderingPhase.public double getTimeConstant()
public void setTimeConstant(double timeConstant)
timeConstant
- New value of property timeConstant.public Learner getLearner()
Synapse
getLearner
in interface Learnable
getLearner
in class FullSynapse
Learnable.getLearner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |