public class SOMInitializer extends java.lang.Object implements LayerInitializer
Modifier and Type | Field and Description |
---|---|
private double[][][][] |
data |
private int |
initxsize |
private int |
initysize |
private int |
initzsize |
private Layer |
layer |
private int |
xSize |
private int |
ySize |
private int |
zSize |
Constructor and Description |
---|
SOMInitializer(Layer layer,
int xSize,
int ySize,
int zSize) |
Modifier and Type | Method and Description |
---|---|
private static double[] |
asdf(double k,
double zinitsize,
double zsize) |
Unit[][][] |
initialize()
Initialize the SOM Layer
|
static void |
main(java.lang.String[] args)
Test method for testing the other methods
|
private void |
read()
Read weights from an already trained SOM
|
protected static double[] |
vectorMean(double[][] vectors,
double[] weights)
Calculates a weighted mean of vectors.
|
private Layer layer
private int xSize
private int ySize
private int zSize
private double[][][][] data
private int initzsize
private int initysize
private int initxsize
public SOMInitializer(Layer layer, int xSize, int ySize, int zSize)
public Unit[][][] initialize()
LayerInitializer
initialize
in interface LayerInitializer
private void read() throws java.io.FileNotFoundException, SOMLibFileFormatException
java.io.FileNotFoundException
SOMLibFileFormatException
protected static double[] vectorMean(double[][] vectors, double[] weights) throws java.lang.IllegalArgumentException
vectors
- an array of double vectorsweights
- weights for a weighted mean calculationjava.lang.IllegalArgumentException
private static double[] asdf(double k, double zinitsize, double zsize)
public static void main(java.lang.String[] args)