at.tuwien.ifs.somtoolbox.visualization.clustering
Class SingleLinkageTreeBuilder
java.lang.Object
at.tuwien.ifs.somtoolbox.visualization.clustering.TreeBuilder
at.tuwien.ifs.somtoolbox.visualization.clustering.SingleLinkageTreeBuilder
public class SingleLinkageTreeBuilder
- extends TreeBuilder
Single Linkage Clustering Algorithm. This is an adapted version only calculating the distances to the direct
neighbours. This class is not compatible with mnemonic SOMs (and probably also not compatible with hierarchical SOMs)
- Version:
- $Id: SingleLinkageTreeBuilder.java 3938 2010-11-17 15:15:25Z mayer $
- Author:
- Angela Roiger
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleLinkageTreeBuilder
public SingleLinkageTreeBuilder()
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
calculateNearestDistances
private TreeSet<NodeDistance> calculateNearestDistances(GeneralUnitPNode[][] units)
throws ClusteringAbortedException
- Calculates the distances from each unit to its neighbours to the right, bottom and bottom-right.
- 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