org.retro.neural
Class SOM

java.lang.Object
  extended byorg.retro.neural.Map2D
      extended byorg.retro.neural.SOM

public class SOM
extends Map2D


Nested Class Summary
 
Nested classes inherited from class org.retro.neural.Map2D
Map2D.ReportTimerTask
 
Field Summary
 
Fields inherited from class org.retro.neural.Map2D
_A, _N1, _N2, _percent_done, _PX, _wheel, REPORT_MSEC
 
Constructor Summary
SOM(double[][] X, int N1, int N2)
           
SOM(double[][] X, int N1, int N2, double[] P)
           
SOM(double[][] X, int N1, int N2, double[] P, long seed)
           
SOM(double[][] X, int N1, int N2, double[] P, java.util.Random rand)
           
SOM(double[][] X, int N1, int N2, long seed)
          Builds SOM with random initial weights and uniform probability density function.
SOM(double[][] X, int N1, int N2, java.util.Random rand)
          Builds SOM with random initial weights and uniform probability density function.
 
Method Summary
protected  void initA()
           
 void learn(double ei, double ef, double sigma_i, double sigma_f, int tmax)
          Runs learning iterations.
protected  double sigma(int t, int tmax)
           
 
Methods inherited from class org.retro.neural.Map2D
adapt, getColumnDimension, getRowDimension, getUnit, getUnit, getUnits, getWeights, learn, randomSignal, scale, updf, vector, winner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOM

public SOM(double[][] X,
           int N1,
           int N2,
           double[] P,
           java.util.Random rand)
    throws java.lang.IllegalArgumentException

SOM

public SOM(double[][] X,
           int N1,
           int N2,
           double[] P)
    throws java.lang.IllegalArgumentException

SOM

public SOM(double[][] X,
           int N1,
           int N2,
           double[] P,
           long seed)
    throws java.lang.IllegalArgumentException

SOM

public SOM(double[][] X,
           int N1,
           int N2)

SOM

public SOM(double[][] X,
           int N1,
           int N2,
           long seed)
Builds SOM with random initial weights and uniform probability density function.

Parameters:
X - data to learn
N1 - number of rows
N2 - number of columns
seed - seed for random-number generator

SOM

public SOM(double[][] X,
           int N1,
           int N2,
           java.util.Random rand)
Builds SOM with random initial weights and uniform probability density function.

Parameters:
X - data to learn
N1 - number of rows
N2 - number of columns
rand - random-number generator
Method Detail

learn

public void learn(double ei,
                  double ef,
                  double sigma_i,
                  double sigma_f,
                  int tmax)
Runs learning iterations. Learning rate e(t) = ei(ef/ei)^{t/tmax}.

Parameters:
sigma_i - initial width parameter
sigma_f - final width parameter
tmax - total number of time-steps to run

initA

protected void initA()
Specified by:
initA in class Map2D

sigma

protected double sigma(int t,
                       int tmax)
Specified by:
sigma in class Map2D