at.tuwien.ifs.somtoolbox.visualization.clustering
Class WardsLinkageTreeBuilder

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
      extended by at.tuwien.ifs.somtoolbox.visualization.clustering.AbstractWardsLinkageTreeBuilder
          extended by at.tuwien.ifs.somtoolbox.visualization.clustering.WardsLinkageTreeBuilder

public class WardsLinkageTreeBuilder
extends AbstractWardsLinkageTreeBuilder

Adaption of the Ward's Linkage Clustering Algorithm. This Version only calculates the distances to directly neighbouring clusters. This class is not compatible with mnemonic SOMs (and probably also not compatible with hierarchical SOMs).
Use WardsLinkageTreeBuilderAll for the "real" Ward's clustering.

Version:
$Id: WardsLinkageTreeBuilder.java 3925 2010-11-09 10:52:31Z mayer $
Author:
Angela Roiger

Field Summary
 
Fields inherited from class at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
level, monitor, progress, progressWriter
 
Constructor Summary
WardsLinkageTreeBuilder()
           
 
Method Summary
private  TreeSet<NodeDistance> calculateInitialDistances(GeneralUnitPNode[][] units)
          Calculates the initial distances from each unit to its neighbours to the right, bottom, bottom-right and bottom-left.
 ClusteringTree createTree(GeneralUnitPNode[][] units)
          Calculation of the Clustering.
 String getClusteringAlgName()
           
 
Methods inherited from class at.tuwien.ifs.somtoolbox.visualization.clustering.AbstractWardsLinkageTreeBuilder
calcESSincrease
 
Methods inherited from class at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
allowAborting, finishMonitor, incrementMonitor, resetMonitor, setMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WardsLinkageTreeBuilder

public WardsLinkageTreeBuilder()
Method Detail

createTree

public ClusteringTree createTree(GeneralUnitPNode[][] units)
                          throws ClusteringAbortedException
Calculation of the Clustering. This code is only compatible with rectangular, non hierarchical SOMs!

Specified by:
createTree in class TreeBuilder
Parameters:
units - the GeneralUnitPNode Array containing all the units of the SOM
Returns:
the ClusteringTree (i.e. the top node of the tree)
Throws:
ClusteringAbortedException

calculateInitialDistances

private TreeSet<NodeDistance> calculateInitialDistances(GeneralUnitPNode[][] units)
                                                 throws ClusteringAbortedException
Calculates the initial distances from each unit to its neighbours to the right, bottom, bottom-right and bottom-left.

Parameters:
units - A GeneralUnitPNode[][] containing the Units of the som
Returns:
a TreeSet of NodeDistances containing the distances between the units starting with the smallest.
Throws:
ClusteringAbortedException

getClusteringAlgName

public String getClusteringAlgName()
Specified by:
getClusteringAlgName in class TreeBuilder