at.tuwien.ifs.somtoolbox.visualization.clustering
Class WardsLinkageTreeBuilder
java.lang.Object
at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
at.tuwien.ifs.somtoolbox.visualization.clustering.AbstractWardsLinkageTreeBuilder
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WardsLinkageTreeBuilder
public WardsLinkageTreeBuilder()
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