comirva.mlearn
Class GHSOM

java.lang.Object
  extended by comirva.mlearn.SOM
      extended by comirva.mlearn.GHSOM
All Implemented Interfaces:
VisuListItem, Serializable

public class GHSOM
extends SOM

See Also:
Serialized Form

Field Summary
static int NA_MAX_DEPTH
           
static int NA_MAX_SIZE
           
 
Fields inherited from class comirva.mlearn.SOM
altLabels, circular, codebook, coOccMatrix, coOccMatrixLabels, data, INIT_GRADIENT, INIT_LINEAR, INIT_RANDOM, INIT_SLC, intMUCols, intMURows, labels, method, statusBar, TRAIN_BATCH, TRAIN_SEQ, trainingLength, voronoiSet
 
Constructor Summary
GHSOM(DataMatrix trainData)
           
 
Method Summary
static Vector<Double> calculateMean(Vector<Vector<Double>> inputVectors)
           
 Vector<Double> calculateVoronoiMean(Vector<Integer> inputVoronoiSet)
           
 String getAltLabel(int dataItemIndex)
           
 Vector<String> getAltLabels()
           
 Collection<GHSOM> getChildren()
           
 DataMatrix getCoOccMatrix()
           
 Vector<String> getCoOccMatrixLabels()
           
 int getHierarchyDepth()
           
 String getLabel(int dataItemIndex)
          Returns the label for the data item whose index is dataItemIndex.
 Vector<String> getLabels()
           
 int getMaxDepth()
           
 int getMaxSize()
           
 GHSOM getParent()
           
 List<Integer> getPrototypesOfSubSOMs(GhSomIndividualPrototypeFinder prototypeFinder)
           
 GhSomPrototypeFinder getPrototypor()
           
 List<Integer> getSequentialKeyList()
           
 List<String> getSequentialList()
           
 GHSOM getSubSOM(int nodeNumber)
           
 boolean isCalculationReady()
           
 boolean isOnlyFirstCircular()
           
 boolean isOnlyOneEntryPerNode()
           
 boolean isOrientated()
           
 void setExpandThreshold(double expandThreshold)
           
 void setGrowThreshold(double growThreshold)
           
 void setInitMethod(int initMethod)
           
 void setInitNumberOfColumns(int initNumberOfColumns)
           
 void setInitNumberOfRows(int initNumberOfRows)
           
 void setMaxDepth(int maxDepth)
           
 void setMaxSize(int maxSize)
           
 void setOnlyFirstCircular(boolean onlyFirstCircular)
           
 void setOnlyOneEntryPerNode(boolean onlyOneEntryPerNode)
           
 void setOrientated(boolean orientated)
           
 void setPrototypor(GhSomPrototypeFinder prototypor)
           
 void train(int methodValue, int length)
          Trains the GHSOM using the method given in the parameter method.
 
Methods inherited from class comirva.mlearn.SOM
clearAltLabels, clearLabels, createVoronoiSet, euclideanDistance, getBMU, getCodebook, getDataset, getGridcolors, getMDM, getNumberOfColumns, getNumberOfDataItems, getNumberOfRows, getOrderedBMUs, getPrototypesForMU, getVoronoiMatrix, gradientInit, init, initWithCorners, isColorByPCA, linearInit, mapunitDistance, printVoronoiSet, randomInit, setAltLabels, setCircular, setCoOccMatrix, setCoOccMatrixLabels, setLabels, setMDM, setSOMSize, setTrainingLength, showCurrentFeatureState, showCurrentFeatureState, slcInit, trainBatch, trainSequential, vectorDistance, vectorDistanceMultiply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NA_MAX_SIZE

public static final int NA_MAX_SIZE
See Also:
Constant Field Values

NA_MAX_DEPTH

public static final int NA_MAX_DEPTH
See Also:
Constant Field Values
Constructor Detail

GHSOM

public GHSOM(DataMatrix trainData)
Method Detail

train

public void train(int methodValue,
                  int length)
Trains the GHSOM using the method given in the parameter method.

Overrides:
train in class SOM
Parameters:
methodValue - the training method used
length - the training length in epochs
See Also:
SOM.TRAIN_SEQ, SOM.TRAIN_BATCH

calculateVoronoiMean

public Vector<Double> calculateVoronoiMean(Vector<Integer> inputVoronoiSet)

calculateMean

public static Vector<Double> calculateMean(Vector<Vector<Double>> inputVectors)

getSubSOM

public GHSOM getSubSOM(int nodeNumber)

getChildren

public Collection<GHSOM> getChildren()

getParent

public GHSOM getParent()

getLabels

public Vector<String> getLabels()
Overrides:
getLabels in class SOM

getLabel

public String getLabel(int dataItemIndex)
Description copied from class: SOM
Returns the label for the data item whose index is dataItemIndex. If not labels were specified, the dataItemIndex is returned as String.

Overrides:
getLabel in class SOM
Parameters:
dataItemIndex - the index of the data item for which the label is requested
Returns:
a String containing the description (label) of the data item

getAltLabels

public Vector<String> getAltLabels()
Overrides:
getAltLabels in class SOM

getAltLabel

public String getAltLabel(int dataItemIndex)
Overrides:
getAltLabel in class SOM

getCoOccMatrix

public DataMatrix getCoOccMatrix()
Overrides:
getCoOccMatrix in class SOM

getCoOccMatrixLabels

public Vector<String> getCoOccMatrixLabels()
Overrides:
getCoOccMatrixLabels in class SOM

setExpandThreshold

public void setExpandThreshold(double expandThreshold)

setGrowThreshold

public void setGrowThreshold(double growThreshold)

setInitMethod

public void setInitMethod(int initMethod)

setInitNumberOfColumns

public void setInitNumberOfColumns(int initNumberOfColumns)

setInitNumberOfRows

public void setInitNumberOfRows(int initNumberOfRows)

getHierarchyDepth

public int getHierarchyDepth()

getPrototypor

public GhSomPrototypeFinder getPrototypor()

setPrototypor

public void setPrototypor(GhSomPrototypeFinder prototypor)

getMaxDepth

public int getMaxDepth()

setMaxDepth

public void setMaxDepth(int maxDepth)

getMaxSize

public int getMaxSize()

setMaxSize

public void setMaxSize(int maxSize)

isOnlyFirstCircular

public boolean isOnlyFirstCircular()

setOnlyFirstCircular

public void setOnlyFirstCircular(boolean onlyFirstCircular)

isCalculationReady

public boolean isCalculationReady()

isOrientated

public boolean isOrientated()

setOrientated

public void setOrientated(boolean orientated)

isOnlyOneEntryPerNode

public boolean isOnlyOneEntryPerNode()

setOnlyOneEntryPerNode

public void setOnlyOneEntryPerNode(boolean onlyOneEntryPerNode)

getSequentialList

public List<String> getSequentialList()

getSequentialKeyList

public List<Integer> getSequentialKeyList()

getPrototypesOfSubSOMs

public List<Integer> getPrototypesOfSubSOMs(GhSomIndividualPrototypeFinder prototypeFinder)