simbad.piconode.core.node
Class SelfOrganizingMap

java.lang.Object
  extended by simbad.piconode.core.node.Node
      extended by simbad.piconode.core.node.ConnectedNode
          extended by simbad.piconode.core.node.ModularNode
              extended by simbad.piconode.core.node.Module
                  extended by simbad.piconode.core.node.Network
                      extended by simbad.piconode.core.node.NeuralNetwork
                          extended by simbad.piconode.core.node.SelfOrganizingMap
All Implemented Interfaces:
java.io.Serializable, XmlRepresentation

public class SelfOrganizingMap
extends NeuralNetwork
implements java.io.Serializable

This class implement a simple 2D "Kohonen" Self Organizing Map. see tutorials.

See Also:
Serialized Form

Field Summary
private  int _BMUindex
           
private  int _dx
           
private  int _dy
           
private  double _lambdaTimeConstant
           
 double _learningRate
           
private  double _mapRadius
           
private  double _startLearningRate
           
private  int _steps
           
private  int _totalSteps
           
 
Fields inherited from class simbad.piconode.core.node.NeuralNetwork
_activationFunctionForArcsFromBiasNeuron, _allNeuronsUnorderedList, _biasArcList, _biasNeuron, _containsBiasNeuron, _init, _inputNeuronsList, _outputNeuronsList
 
Fields inherited from class simbad.piconode.core.node.Network
_arcList, _nodeList
 
Fields inherited from class simbad.piconode.core.node.ConnectedNode
_incomingArcsList, _outgoingArcsList
 
Fields inherited from class simbad.piconode.core.node.Node
_name, nGene
 
Constructor Summary
SelfOrganizingMap()
          create a new network (no bias neuron for SOM).
 
Method Summary
 int findBMU(double[] __inputValues)
          find the best matching unit ("BMU") wrt.
 int getBMU()
          return the last Best Matching Unit ("BMU") found Note : this method does not iterate the SOM! -- see findBMU(intputValues) method for iteration This method may be useful for debug or demo purpose (e.g.
 int getInputSize()
          return the number of inputs -- symply calls with the getInputNeuronListSize method ( methods are synonyms )
 double getLambdaTimeConstant()
           
 double getMapRadius()
           
 SOMoutputNeuron getOutputNeuronAt(int __x, int __y)
           
 double[] getOutputNeuronValues(int __x, int __y)
           
 int getTotalSteps()
           
 void initNetwork()
          Perform initialization of the network.
 void initNetwork(int __inputNb, int __dx, int __dy, double __startLearningRate, int __totalSteps)
          Perform the full creation and initialization of the network using the parameters and set the radius-related parameters (size of BMU neighbourhood to be updated and decreasing factor for the radius over time).
static void main(java.lang.String[] args)
          Quick test -- for a more "illustrative" test, please refer to Tutorial_5
 void registerNode()
          A Self Organizing Map contains only input and output nodes.
 void setLambdaTimeConstant(double __lambda)
           
 void setMapRadius(double __mapRadius)
           
 void step()
          perform one iteration step using input data from incoming nodes if any -- arity must be correct
 void step(java.util.ArrayList __inputValues)
          compute output values from input values (i.e.
 void step(double[] __inputValues)
          compute output values from input values (i.e.
 
Methods inherited from class simbad.piconode.core.node.NeuralNetwork
addBiasNeuron, containsBiasNeuron, displayInformation, getBiasArcAt, getBiasArcListSize, getInputNeuronListSize, getNodeAt, getNodeListSize, getNumberOfAllArcs, getOutputNeuronAt, getOutputNeuronListSize, getWeightsFromAllArcs, getWeightsFromBiasArcs, getWeightsFromStdArcs, registerArc, registerBiasArc, registerInputNeuron, registerNode, registerOutputNeuron, setAllArcsWeightValues, setBiasArcsWeightValues, setStdArcsWeightValues, stepModule, toXml
 
Methods inherited from class simbad.piconode.core.node.Network
getArcAt, getArcListSize, updateGenotype
 
Methods inherited from class simbad.piconode.core.node.Module
getInputRegister, getInputRegisterSize, getOldOutputRegister, getOldOutputRegisterSize, getOutputRegister, getOutputRegisterSize, setInputRegister, setInputRegisterSize, setOldOutputRegister, setOldOutputRegisterSize, setOutputRegister, setOutputRegisterSize
 
Methods inherited from class simbad.piconode.core.node.ModularNode
isUpdated, setUpdated
 
Methods inherited from class simbad.piconode.core.node.ConnectedNode
addIncomingArc, addOutgoingArc, getIncomingArcAt, getIncomingArcsList, getIncomingArcsListSize, getOutgoingArcAt, getOutgoingArcsList, getOutgoingArcsListSize
 
Methods inherited from class simbad.piconode.core.node.Node
getName, getNGene, setName, setNGene
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mapRadius

private double _mapRadius

_lambdaTimeConstant

private double _lambdaTimeConstant

_startLearningRate

private double _startLearningRate

_learningRate

public double _learningRate

_steps

private int _steps

_totalSteps

private int _totalSteps

_BMUindex

private int _BMUindex

_dx

private int _dx

_dy

private int _dy
Constructor Detail

SelfOrganizingMap

public SelfOrganizingMap()
create a new network (no bias neuron for SOM).

Method Detail

initNetwork

public void initNetwork()
Perform initialization of the network. Should be called only once after all neurons and arcs are registered and input and ouput neurons are identified.


initNetwork

public void initNetwork(int __inputNb,
                        int __dx,
                        int __dy,
                        double __startLearningRate,
                        int __totalSteps)
Perform the full creation and initialization of the network using the parameters and set the radius-related parameters (size of BMU neighbourhood to be updated and decreasing factor for the radius over time). note : there are __dx*__dy output neurons


step

public void step(double[] __inputValues)
compute output values from input values (i.e. f(in)=out).

Parameters:
__inputValuesList -

step

public void step()
perform one iteration step using input data from incoming nodes if any -- arity must be correct

Specified by:
step in class Node
Parameters:
__valuesList -

step

public void step(java.util.ArrayList __inputValues)
compute output values from input values (i.e. f(in)=out).

Specified by:
step in class Module
Parameters:
__inputValuesList -

findBMU

public int findBMU(double[] __inputValues)
find the best matching unit ("BMU") wrt. input values

Parameters:
__inputValues -

registerNode

public void registerNode()
A Self Organizing Map contains only input and output nodes.


getMapRadius

public double getMapRadius()

setMapRadius

public void setMapRadius(double __mapRadius)

getBMU

public int getBMU()
return the last Best Matching Unit ("BMU") found Note : this method does not iterate the SOM! -- see findBMU(intputValues) method for iteration This method may be useful for debug or demo purpose (e.g. perform a learning step and then check which was the BMU)

Returns:

getTotalSteps

public int getTotalSteps()

setLambdaTimeConstant

public void setLambdaTimeConstant(double __lambda)

getLambdaTimeConstant

public double getLambdaTimeConstant()

getOutputNeuronValues

public double[] getOutputNeuronValues(int __x,
                                      int __y)

getOutputNeuronAt

public SOMoutputNeuron getOutputNeuronAt(int __x,
                                         int __y)

getInputSize

public int getInputSize()
return the number of inputs -- symply calls with the getInputNeuronListSize method ( methods are synonyms )

Returns:

main

public static void main(java.lang.String[] args)
Quick test -- for a more "illustrative" test, please refer to Tutorial_5

Parameters:
args -