at.tuwien.ifs.somtoolbox.layers.initialisation
Class SOMInitializer

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.layers.initialisation.SOMInitializer
All Implemented Interfaces:
LayerInitializer

public class SOMInitializer
extends Object
implements LayerInitializer

Version:
$Id: SOMInitializer.java 3893 2010-11-03 13:57:47Z mayer $
Author:
Stefan Bischof, Leo Sklenitzka

Field Summary
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 Summary
SOMInitializer(Layer layer, int xSize, int ySize, int zSize)
           
 
Method Summary
private static double[] asdf(double k, double zinitsize, double zsize)
           
 Unit[][][] initialize()
          Initialize the SOM Layer
static void main(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layer

private Layer layer

xSize

private int xSize

ySize

private int ySize

zSize

private int zSize

data

private double[][][][] data

initzsize

private int initzsize

initysize

private int initysize

initxsize

private int initxsize
Constructor Detail

SOMInitializer

public SOMInitializer(Layer layer,
                      int xSize,
                      int ySize,
                      int zSize)
Method Detail

initialize

public Unit[][][] initialize()
Description copied from interface: LayerInitializer
Initialize the SOM Layer

Specified by:
initialize in interface LayerInitializer
Returns:
initialized SOM

read

private void read()
           throws FileNotFoundException,
                  SOMLibFileFormatException
Read weights from an already trained SOM

Throws:
FileNotFoundException
SOMLibFileFormatException

vectorMean

protected static double[] vectorMean(double[][] vectors,
                                     double[] weights)
                              throws IllegalArgumentException
Calculates a weighted mean of vectors. Prone to numerical error: floating point arithmetics ...

Parameters:
vectors - an array of double vectors
weights - weights for a weighted mean calculation
Returns:
a mean vector
Throws:
IllegalArgumentException

asdf

private static double[] asdf(double k,
                             double zinitsize,
                             double zsize)

main

public static void main(String[] args)
Test method for testing the other methods