edu.wlu.cs.levy.SNARLI
Class SOM

java.lang.Object
  |
  +--edu.wlu.cs.levy.SNARLI.Map2D
        |
        +--edu.wlu.cs.levy.SNARLI.SOM

public class SOM
extends Map2D

SOM implements Kohonen's Self-Organizing Map.

Since:
JDK1.2

Constructor Summary
SOM(double[][] X, int N1, int N2)
          Builds SOM with random initial weights and uniform probability density function.
SOM(double[][] X, int N1, int N2, double[] P)
          Builds SOM with random initial weights.
SOM(double[][] X, int N1, int N2, double[] P, long seed)
          Builds SOM with random initial weights.
SOM(double[][] X, int N1, int N2, double[] P, java.util.Random rand)
          Builds SOM with random initial weights.
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
 void learn(double ei, double ef, double sigma_i, double sigma_f, int tmax)
          Runs learning iterations.
 
Methods inherited from class edu.wlu.cs.levy.SNARLI.Map2D
getColumnDimension, getRowDimension, getUnit, getUnits, getWeights
 
Methods inherited from class java.lang.Object
equals, 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
Builds SOM with random initial weights.

Parameters:
X - data to learn
N1 - number of rows
N2 - number of columns
P - probability density function over X
rand - random-number generator
Throws:
java.lang.IllegalArgumentException - if X has fewer than two dimensions
java.lang.IllegalArgumentException - if X and P have different lengths
java.lang.IllegalArgumentException - if elements of P do not sum to 1

SOM

public SOM(double[][] X,
           int N1,
           int N2,
           double[] P)
    throws java.lang.IllegalArgumentException
Builds SOM with random initial weights.

Parameters:
X - data to learn
P - probability density function over X
N1 - number of rows
N2 - number of columns
Throws:
java.lang.IllegalArgumentException - if x and P have different lengths
java.lang.IllegalArgumentException - if elements of P do not sum to 1

SOM

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

Parameters:
X - data to learn
P - probability density function over X
N1 - number of rows
N2 - number of columns
seed - seed for random-number generator
Throws:
java.lang.IllegalArgumentException - if X and P have different lengths
java.lang.IllegalArgumentException - if elements of P do not sum to 1

SOM

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

Parameters:
X - data to learn
N1 - number of rows
N2 - number of columns

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